brew update and can still reproduce the problem?brew doctor, fixed all issues and can still reproduce the problem?brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link?brew gist-logs didn't work: ran brew config and brew doctor and included their output with your issue?$ brew gist-logs macvim
Error: No logs.
$ brew config
HOMEBREW_VERSION: 2.4.11
ORIGIN: https://github.com/Homebrew/brew
HEAD: 9ef993ab570ac6d4f2c4f88a96f2da8c3e71fa85
Last commit: 2 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: a645bdd42e8b8703edfa27d7f69611dc263e17fa
Core tap last commit: 3 hours ago
Core tap branch: master
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_EDITOR: mvim -v
HOMEBREW_MAKE_JOBS: 8
CPU: octa-core 64-bit kabylake
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
Clang: 12.0 build 1200
Git: 2.28.0 => /usr/local/bin/git
Curl: 7.64.1 => /usr/bin/curl
Java: 1.8.0_242
macOS: 10.15.6-x86_64
CLT: 12.0.0.0.1.1595091463
Xcode: N/A
I upgraded macvim by running brew upgrade, and now it fails anytime it tries to import python modules.
When I start vim, a plugin tries to load a python module, and I get this error:
E492: Not an editor command: from multiprocessing.resource_tracker import main;main(8)
I should be able to require python modules.
brew install commands)brew install macvim
install a plugin that uses python (like https://github.com/Shougo/deoplete.nvim)
mvim -v
What makes you think this is a problem with homebrew instead of Macvim?
As a possibly useful data point: I have the same issue with vimR (the neovim fork of Macvim), where after the homebrew upgrade to Python 3.8 (without upgrading vimR), I get the same (or a similar, since neovim works slightly differently from vim in this regard) failure with Python plugins. vimR reports
Checking /usr/local/bin/python3 caused an unknown error. (1, output: Fatal Python error: config_get_locale_encoding: failed to get the locale encoding: nl_langinfo(CODESET) failed
Python runtime state: preinitialized
@clason that sounds like it could be a problem with python itself? https://bugs.python.org/issue34544
What makes you think this is a problem with homebrew instead of Macvim?
I guess I'm not sure, but it seems unlikely that macvim suddenly stop working with python. I downloaded the latest version of macvim from github (https://github.com/macvim-dev/macvim/releases/tag/snapshot-163) and it works fine with python 3.7. They are working on shipping a version that works with 3.8: https://github.com/macvim-dev/macvim/issues/1012, however it's apparently broken in a different way: https://github.com/macvim-dev/macvim/issues/1073.
I'm sorry I don't have more insight into what's wrong, I realize this is not a great bug report. Happy to provide any more details that might help track down the issue.
MacVim maintainer here. I'm trying to push the next version out anyway but trying to figure out a linker issue. May just try to punt until then (couple days max) to see if it fixes anything and how it behaves since it updates to using Python 3.8.
@RobinClowers No, it turned out to be a user error 馃う (Python 3.8 is stricter about specifying full locales, and I still had language en_US set in my vimrc, which was taken as the default LC_CTYPE locale when vimR was started from Finder -- as opposed to from a terminal, where the corresponding shell environment variable, which Apple Terminal magically sets correctly even without a .zshenv, are taken instead. Changing that to en_US.UTF-8 fixed my issue.)
Since the OP describes a reproducer with MacVim started from the terminal, I no longer think this is related.
I would report the same/similar issue on linux brew - vim formula : the python3+ support is dropped from the brew vim. The previous version of vim has the correct python3+ compilation option enabled but not the current version. some vim plugins depend on python3 these days.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Most helpful comment
As a possibly useful data point: I have the same issue with vimR (the neovim fork of Macvim), where after the homebrew upgrade to Python 3.8 (without upgrading vimR), I get the same (or a similar, since neovim works slightly differently from vim in this regard) failure with Python plugins. vimR reports