Skip to content

Instantly share code, notes, and snippets.

@asenchi
Created November 20, 2009 16:57
Show Gist options
  • Save asenchi/239628 to your computer and use it in GitHub Desktop.
Save asenchi/239628 to your computer and use it in GitHub Desktop.
Overview of the steps and commands associated with virtualenv and pip.
$ sudo easy_install pip
$ sudo pip install virtualenv
$ sudo pip install virtualenvwrapper # (or virtualenv_wrapper)
$ WORKON_HOME=$HOME/.virtualenvs
$ PIP_VIRTUALENV_BASE=$WORKON_HOME
$ source /usr/local/bin/virtualenvwrapper_bashrc
$ mkvirtualenv projectname
$ easy_install pip
$ pip install tornado # NOTICE: no sudo!
Once you've created the virtualenv 'unscattered' you will now have a full python environment installed in:
$HOME/.virtualenv/unscattered
Python packages are now installed in:
$HOME/.virtualenv/unscattered/lib/python#.#/site-packages
Use the following commands:
$ deactivate # this leaves the virtual env
$ workon # list virtual environments
$ workon ${virtualenv-name} # enter the specific virtualenv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment