Virtualenv Quick Guide

I always forget how to start and stop virtualenv on my Linux machines. I'm trying to get in the habit of using it more often, but until then I need to follow these steps:

Verify that virtualenv is installed with:

virtualenv --version



If it is not installed, it can be installed with pip:

pip install virtualenv

-or-

sudo pip install -U virtualenv




Once it is installed, a virtualenv instance can be created with:

virtualenv <name>

such as

virtualenv venv



Then it is started with:

source ./<name>/bin/activate

such as

source ./venv/bin/activate



Once you are done with it, it can be deactivated with:

deactivate



All done!

Comments

Popular posts from this blog

Cable Test on Cisco Catalyst Switches