Install virtualenv and virtualenvwrapper on OSX

Manage python dependencies with ease

Posted by acidjunk on June 2, 2015

When running multiple python projects virtualenv is almost mandatory nowadays. It allows you to install python dependencies on a per project basis without screwing around with the OSX installed python. I especially like to install virtualenvwrapper also as it eases the way to create, used and delete virtual envs.

Choose whether you want OSX python or home brew version. When you choose home brew run:

brew install python

Then install virtualenv:

pip install virtualenv
pip install virtualenvwrapper
mkdir -p .virtualenvs

Add some conf stuff to your .bash_profile or .bash_rc

### Virtual envs
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/GIT
source /usr/local/bin/virtualenvwrapper.sh