Saturday, November 8, 2014

python virtualenv in a short way

1- install virtualenv
root@python# pip install virtualenv

2- setup first virtual environment
root@python# virtualenv  pyvirt1

3- Activate the virtual environment that we just created
root@python# source pyvirt1/bin/activate
(pyvirt1)root@python#

4- Install new package in the virtual enviroment
(pyvirt1)root@python# pip install yolk

5- List all package inside our virtual enviroment
(pyvirt1)root@python# venv/bin/yolk -l
Python          - 2.7.6        - active development (/usr/lib/python2.7/lib-dynload)
argparse        - 1.2.1        - active development (/usr/lib/python2.7)
pip 1.5.4 has no metadata
setuptools 2.2 has no metadata
wsgiref         - 0.1.2        - active development (/usr/lib/python2.7)
yolk            - 0.4.3        - active


6- exit the virtual enviroment
(pyvirt1)root@python# deactivate
root@python#


No comments:

Post a Comment