-
-
Save netologist/3186381 to your computer and use it in GitHub Desktop.
Fix Mountain Lion 10.8 Python IOError pyconfig.h Error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
After upgrading to Mountain Lion : 10.8 I noticed that I was getting Python errors which prevented me from starting vim: | |
Traceback (most recent call last): | |
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 565, in <module> | |
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 547, in main | |
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 278, in addusersitepackages | |
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 253, in getusersitepackages | |
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 243, in getuserbase | |
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py", line 523, in get_config_var | |
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py", line 419, in get_config_vars | |
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py", line 298, in _init_posix | |
IOError: invalid Python installation: unable to open /usr/include/python2.7/pyconfig.h (No such file or directory) | |
First I tried the first step from this: https://gist.github.com/3180261 - which didn't stop the errors from displaying... | |
I still need to find where the path is being incorrectly set and fix it there, but if you need to be up and running quickly with vim, this should also work: | |
sudo mkdir -p /usr/include/python2.7 | |
sudo ln -s /System/Library/Frameworks/Python.framework/Versions/Current/include/python2.7/pyconfig.h /usr/include/python2.7/pyconfig.h |
Excellent! Thanks for posting this.
Oh man. Thanks! I'm back in business. Now I can actually try to find out why my PHP isn't working at localhost.
Wow, this helps a lot. Thanks!
Thanks a lot man! saved me time
Thanks, this fixed my problem of view
not working at the command line.
Thanks a lot
Thanks.
Thanks a lot.
Thanks!
Thank you!
谢谢(Thanks!)。
Genius! Thanks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Man, thanks for this.