Skip to content

Instantly share code, notes, and snippets.

@policecar
Created March 4, 2014 13:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save policecar/9346303 to your computer and use it in GitHub Desktop.
Save policecar/9346303 to your computer and use it in GitHub Desktop.
Using virtualenv(wrapper) as non-root user
# install setuptools and pip to user local
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
python ez_setup.py --user
curl -O https://raw.github.com/pypa/pip/master/contrib/get-pip.py
python get-pip.py --user
# install virtualenv and virtualenvwrapper to user local directory
pip install --install-option="--user" virtualenv
pip install --install-option="--user" virtualenvwrapper
# add the following lines to your shell startup file, e.g. your .bashrc
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/src
source $HOME/.local/bin/virtualenvwrapper.sh
# reload the startup file
. .bashrc
# make a new virtual env including project and custom python version on OS X using macports
mkvirtualenv -a ~/codespace/etaoin --python=/opt/local/bin/python2.7 etaoin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment