Instantly share code, notes, and snippets.

Embed
What would you like to do?

Install Python

$ brew install readline sqlite gdbm --universal
$ brew install python --universal --framework
$ python --version
Python 2.7.3

Symlinks...

$ mkdir ~/Frameworks
$ ln -s "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework" ~/Frameworks
$ /usr/local/share/python/easy_install pip
$ /usr/local/share/python/pip install --upgrade distribute

Add to .zshrc:

# Before other PATHs...
PATH=/usr/local/share/python:${PATH}

# Python
export WORKON_HOME=$HOME/.virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python2.7
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'
export PIP_VIRTUALENV_BASE=$WORKON_HOME
export PIP_RESPECT_VIRTUALENV=true
if [[ -r /usr/local/share/python/virtualenvwrapper.sh ]]; then
    source /usr/local/share/python/virtualenvwrapper.sh
else
    echo "WARNING: Can't find virtualenvwrapper.sh"
fi
source .zshrc

Install virtualenv

$ pip install virtualenv 
$ pip install virtualenvwrapper

Test setup

$ mkvirtualenv test 
$ deactivate test
$ rmvirtualenv test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment