Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...
$ mkdir ~/Frameworks
$ ln -s "/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework" ~/Frameworks
$ /usr/local/share/python/easy_install pip
$ /usr/local/share/python/pip install --upgrade distribute
Add to .bashrc:
# Before other PATHs...
PATH=${PATH}:/usr/local/share/python
# Python
export VIRTUALENV_USE_DISTRIBUTE=1 # <-- Always use pip/distribute
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'
export WORKON_HOME=$HOME/.virtualenvs # <-- Where all virtualenvs will be stored
#export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python2.7
export PIP_VIRTUALENV_BASE=$WORKON_HOME
export PIP_RESPECT_VIRTUALENV=true
if [[ -r /usr/local/bin/virtualenvwrapper.sh ]]; then
source /usr/local/bin/virtualenvwrapper.sh
else
echo "WARNING: Can't find virtualenvwrapper.sh"
fi
Install virtualenv
$ sudo pip install virtualenv
$ sudo pip install virtualenvwrapper
Test setup
$ mkvirtualenv test
$ deactivate
$ rmvirtualenv test