I tried debugging this on my own, but to no avail. Here's the problem -

I have a MacBook Pro 13" OS X 10.7.3 with Python 2.7 (no other version installed)

I recently installed MAMP from their website. It's a good way to test out site building. But today, when I tried installing a python package using easy_install, it just doesn't accept the request. Here's the error -

nitin:~ nitinthewiz$ easy_install virtualenv
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 553, in <module>
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 535, in main
known_paths = addusersitepackages(known_paths)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 268, in addusersitepackages
user_site = getusersitepackages()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 243, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 233, in getuserbase
USER_BASE = get_config_var('userbase')
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py", line 535, in get_config_var
return get_config_vars().get(name)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py", line 434, in get_config_vars
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py", line 287, in _init_posix
raise IOError(msg)
IOError: invalid Python installation: unable to open /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/Makefile (No such file or directory)

I checked out the folder at /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/ and guess what, it's Empty!

The reason I mentioned MAMP in the beginning was because I realized that MAMP has it's own python 2.6 installation within itself and I thought maybe it's interfering with my python 2.7. But it seems that's now the case because when I type python into the terminal, it refers to my python 2.7 as you can see from the path above.

Can anyone help? I was hoping to begin playing around with python after a long time today but this error is making me go crazy! Also, I play around with a lot of things in python and have a lot of packages installed. I have not been able to find a command to list all the packages installed under easy_install.

Can anyone help with either of my problems??

  • /Library/Frameworks/.../2.7 is not from the Apple installed python that is in /System/Library so you DO have another python 2.7 – Mark Jun 18 '12 at 9:59

I've solved this problem (I hope)

I simply went online and downloaded the python 2.7.3 DMG installer for Mac and installed python again. Hopefully, this will let me run everything I want.

As of now, easy_install has started working and I'm going to start playing with Django... :)

  • Note this installs another python - you now have 3 and need to be careful which easy_install etc is used. Apple python 2.7 in /usr/bin, Python.org in /usr/local/bin and teh MAMP one. But this is probably the best way to use python – Mark Jun 18 '12 at 9:56

You must log in to answer this question.

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