Yos Riady software craftsman 🌱

Virtualenvwrapper on OSX Mavericks

After upgrading to Mac OSX Mavericks 10.9, I immediately got the following error message on my terminal windows:

/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: No module named virtualenvwrapper
virtualenvwrapper.sh: There was a problem running the initialization hooks.

If Python could not import the module virtualenvwrapper.hook_loader,
check that virtualenv has been installed for
VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python and that PATH is
set properly.

After some debugging and failed experiments of reinstalling virtualenv, pip, and my Python distribution(!), I’ve arrived at the following solution:

sudo easy_install pip
sudo pip install —upgrade virtualenvwrapper

We just need to reinstall pip and virtualenvwrapper (and virtualenv, by extension) with the above commands. Afterwards, everything should work as expected.

Another issue you may encounter when upgrading to OSX 10.9 are “Segmentation Fault : 11” errors on any second line when opening Python in a terminal window. This can be remedied by running this patch shell script.

Author

Yos is a software craftsman based in Singapore.

📬 Subscribe to my newsletter

Get notified of my latest articles by providing your email below.


Going Serverless book

Interested to find out more about serverless? Going Serverless teaches you how to build scalable applications with the Serverless framework and AWS Lambda. You'll learn how to design, develop, test, deploy, and secure Serverless applications from planning to production.

Learn More →