Saturday, January 02, 2010

Python Virtual Env

Download and install via apt-get, ports, easy_install, etc.

Locate the install directory (usually site-packages) and find the script.
Alternatively, the package manager may have installed a virtualenv script into your PATH.

I will use ENV to refer to /path/to/python/virtual/env
I will use to refer to /path/to/script/

Create a new Virtual Environment
python ENV

(optional) Activate (set PATH and PYTHONPATH) for new Virtual ENV
source ENV/bin/activate

Location of Virtual Env python binary

Location of Virtual ENV python site-packages dir

Location of Virtual ENV python easy_install script