Fixing virtualenv after installing Mountain Lion
After installing Mac OS X Mountain Lion you may find that your Python virtualenv setup has broken. I saw a traceback ending in “IOError: [Errno 2] No such file or directory: ‘/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/__init__.py'”
Another error was being produced by virtualenvwrapper when trying to use the workon command: “ImportError: No module named virtualenvwrapper.hook_loader”
Fixing my virtualenv setup was pretty simple:
- Installed the XCode 4.4 Command Line Tools.
- Re-installed pip: sudo easy_install pip
- Re-installed virtualenv and virtualenvwrapper: sudo pip install virtualenv virtualenvwrapper
No other changes were needed and everything was running smoothly.
have you tried creating new virtualenvs? That still doesn’t work for me
Works fine for me. What error are you getting and what do you have in your profile?
It worked for me! Thanks for the help.
Thanks alot, saved my day.
i only needed to install xcode4.4 command line tool.
thanks!
Thanks a lot for this, worked like a charm!
Happy to help! Other than this slight hiccup I haven’t had any other problems in my dev stack.
Just installing the XCode Command Line Tools fixed this for me.
Thanks!
Hi there,
I reinstalled the command line tools for mountain lion, but it is still not working. Any more ideas?
This happened after installing, pip, virtualenv and then virtualenvwrapper when it crashed.
thanks for any help
Worked for me – thanks so much for posting!
wow 2 days to finally getting this working…thanks to you now Im past it. 😉