Virtualenv Setup with pip on Mac OS X

This is how I setup virtualenv using pip on Mac OS X 10.6.8 with Python 2.6 (modified from Jontourage).

Install virtualenv and virtualenvwrapper:

sudo pip install virtualenv
sudo pip install virtualenvwrapper

Add to .bash_profile:

# virtualenv
export WORKON_HOME=$HOME/.virtualenvs
source /usr/local/bin/

For the changes to .bash_profile to take effect, open a new terminal window or:

source ~/.bash_profile