virtualenv helper tool
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 3 commits ahead, 2 commits behind brianm:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

To use, place venv.bash somewhere and source it, a la:

. venv.bash

You can do this by hand or put it in your ~/.bashrc, which I suggest for ongoing use.

Once it is "installed" via that eval, it defines a venv function which supports:

venv [create <name>]
     [destroy <name>]
     [use <name>]

to create, destroy, use, and list virtual environments respectively.


brianm@binky:~$ venv create spiffy
New python executable in /Users/brianm/.venv/spiffy/bin/python
Installing setuptools............done.
Installing pip...............done.
brianm@binky:~$ venv use spiffy
(spiffy)brianm@binky:~$ which python
(spiffy)brianm@binky:~$ venv ls
(spiffy)brianm@binky:~$ deactivate 

Use $VENV_PROMPT_COLOR to set an ansi color code for the color of the virtual env name in the prompt. I like VENV_PROMPT_COLOR='38;5;53' in xterm-256color. In traditional 16 color xterm-color I would tend towards VENV_PROMPT_COLOR='0;35'.

Use $VENV_DIR if you don't want virtual environments stored in ~/.venv.