My MacVim just crashes and it doesn't allow me to do anything. The error messages are:
Fatal Python error: Py_Initialize: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007fff756eb000 (most recent call first):
Vim: Caught deadly signal ABRT
Vim: preserving files...
Vim: Finished.
I'm wondering if this is related to the Python version on my Mac?
Reproduced. Homebrew just updated to Python 3.6.3, and now this is happening.
When launching from the command line, the error @jeffreyyong reported is shown. When launching from the Finder, the app opens but no window is drawn. Attempting to open new windows doesn't draw anything, but when quitting, I was prompted about closing multiple windows.
Update: Installing the development version of Python (3.7.0a1) with Homebrew (brew upgrade python3 --devel) fixes the problem, and MacVim works as before. I suspect there is a problem with the Homebrew formula, although I don't yet know how to diagnose that.
macOS 10.13
Python 3.6.3
MacVim 8.0-137
Updated https://github.com/macvim-dev/macvim/releases/tag/snapshot-138
Please reopen if still happening with snapshot 138 binary.
Everything appears to work great. Strangely, the old version in Homebrew (snapshot 137_2) works fine today, but I've gone ahead with snapshot-138 from the cask version.
Thanks for the quick response.
After updating MacVim today I was getting the same error. I was able to fix it by following alecshaw's solution and upgrading to the development version of python.
After updating MacVim to 145 today, I met the same problem. I solved it by upgrading python3 to 3.6.4 using HomeBrew.
Having similar problem.
I am on python 3.6.4, and using MacVim 145. However none of above solutions solved my problem.
I found this in my make log:
Could not find service "com.apple.CoreSimulator.CoreSimulatorService"
On further research I found similar issue referenced at
https://trac.macports.org/ticket/49950
Solution was to:
sudo chmod 755 /Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework/Versions/A/XPCServices/com.apple.CoreSimulator.CoreSimulatorService.xpc
This fixed my issue, and I was then able to do a
brew install macvim
I had a similar issue, brew reinstall macvim --env-std --with-override-system-vim seems to have fixed it.
brew install macvim --build-from-source works for me
Most helpful comment
brew install macvim --build-from-sourceworks for me