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:
If it is not installed, it can be installed with pip:
Once it is installed, a virtualenv instance can be created with:
such as
Then it is started with:
such as
Once you are done with it, it can be deactivated with:
All done!
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
Post a Comment