Virtualenv wrapper

Posted on 二 08 七月 2014 in python

Virtualenvwrapper is a set of extensions to easy the use of virtualenv tool. I only use its workon command to active or switch different virtualenvs.

To install it, use command pip install virtualenvwrapper. Then export WORKON_HOME=~/Virtualenvs. I put it in my .zshrc. Then source /usr/local/bin/virtualenvwrapper.sh.

Now you can active or switch a virtualenv use command workon myenv if it is in your WORKON_HOME. To create a new virtualenv, use command mkvirtualenv env1.

Updated on 2015-12-22: oh-my-zsh has virtualenv and virtualenvwrapper plugins. Just enable it in your .zshrc. You don’t need to do previous configuration.