Cheatsheet virtualenvwrapper

This is a cheatsheet for virtualwrapper.

Install virtualenvwrapper

pip install virtualenv

pip install virtualenvwrapper-win

Set environment variable

Add an environment variable WORKON_HOME to specify the path to store environments. By default, this is %USERPROFILE%\Envs. I have set it to the following.

WORKON_HOME=%PYTHON27%\env

Main commands

mkvirtualenv <name>

lsvirtualenv

workon <name>

cdvirtualenv

deactivate

add2virtualenv <full or relative path>

setprojectdir <full or relative path>

cdproject

cdsitepackages

lssitepackages

 

Leave a comment