Virtualenv provides a way to utilize a local python interpreter instead of the system’s. This is especially helpful in situations whereby a project needs to be deployed and may need to maintain its own installation requirements.
Install
1 2 |
# apt-get install python-setuptools # easy_install virtualenv pip |
Create Sandbox
1 2 |
$ virtualenv . $ source ./bin/activate |
Install Modules
1 2 |
(virtualenv)$ pip install module (virtualenv)$ pip install -r requirements.txt |
Deactivate
1 |
(virtualenv)$ deactivate |