Skip to content

Instantly share code, notes, and snippets.

@ifnull
Created March 25, 2013 18:54
Show Gist options
  • Save ifnull/5239597 to your computer and use it in GitHub Desktop.
Save ifnull/5239597 to your computer and use it in GitHub Desktop.
Fix virtualenvs after upgrading to Mountain Lion.
# Comment out virtualenv and mkvirtualenv from .bash_profile
defaults write com.apple.versioner.python Version 2.7
cd ~/Downloads/
curl -o setuptools-0.6c11-py2.7.egg https://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg#md5=fe1f997bc722265116870bc7919059ea
sudo sh setuptools-0.6c11-py2.7.egg
rm setuptools-0.6c11-py2.7.egg
sudo easy_install pip
sudo pip install virtualenv
sudo pip install virtualenvwrapper
sudo touch /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/__init__.py
# Uncomment virtualenv and mkvirtualenv from .bash_profile
# Credits
# http://stackoverflow.com/questions/3129852/python-cant-locate-distutils-path-on-mac-osx
# http://stackoverflow.com/questions/6933535/virtualenvwrapper-errrors-on-mac-os-x-lion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment