Skip to content

Instantly share code, notes, and snippets.

@smarthall
Created December 9, 2013 05:56
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 smarthall/7867898 to your computer and use it in GitHub Desktop.
Save smarthall/7867898 to your computer and use it in GitHub Desktop.
Easy function for switching/making Python Virtualenvs. Put in your ~/.bashrc
function pve {
VENVFILE="$HOME/usr/venv/$1/bin/activate"
if [ -f $VENVFILE ]; then
source $VENVFILE
else
virtualenv $HOME/usr/venv/$1
source $VENVFILE
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment