1

After updating from OS X 10.8.3 to 10.8.5 and XCode my python installation stopped working. This is the output when I try to execute python.

Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 563, in <module>
main()
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 545, in main
known_paths = addusersitepackages(known_paths)
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 278, in addusersitepackages
user_site = getusersitepackages()
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 253, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 243, in getuserbase
USER_BASE = get_config_var('userbase')
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py", line 521, in get_config_var
return get_config_vars().get(name)
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py", line 420, in get_config_vars
_init_posix(_CONFIG_VARS)
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py", line 288, in _init_posix
raise IOError(msg)
IOError: invalid Python installation: unable to open /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/Makefile (No such file or directory)

I installed python separately (not the one that came with OS X) and hope to use that installation, how do I fix this? I have a bunch of virtualenv stuff setup and I don't know if that will break if I reinstall python so I'm hesitant to reinstall python.

1
  • Judging by the path, you used Homebrew to install Python. Did you try reinstalling Python with Homebrew yet? brew uninstall followed by a brew install perhaps? Sep 29, 2013 at 21:02

1 Answer 1

-1

As suggested by Martijn

brew uninstall python

The issue was that homebrew installed python and messed with my paths.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .