How to use virtual environment in ubuntu



$ sudo apt-get install python-setuptools

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
python-setuptools
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 230 kB of archives.
After this operation, 830 kB of additional disk space will be used.
Get:1 http://in.archive.ubuntu.com/ubuntu/ trusty/main python-setuptools all 3.3-1ubuntu1 [230 kB]
Fetched 230 kB in 9s (25.2 kB/s)
Selecting previously unselected package python-setuptools.
(Reading database ... 225639 files and directories currently installed.)
Preparing to unpack .../python-setuptools_3.3-1ubuntu1_all.deb ...
Unpacking python-setuptools (3.3-1ubuntu1) ...
Setting up python-setuptools (3.3-1ubuntu1) ...

$ sudo easy_install virtualenv

Searching for virtualenv
Reading https://pypi.python.org/simple/virtualenv/
Best match: virtualenv 1.11.6
Downloading https://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.11.6.tar.gz#md5=f61cdd983d2c4e6aeabb70b1060d6f49
Processing virtualenv-1.11.6.tar.gz
Writing /tmp/easy_install-H8Uy4W/virtualenv-1.11.6/setup.cfg
Running virtualenv-1.11.6/setup.py -q bdist_egg --dist-dir /tmp/easy_install-H8Uy4W/virtualenv-1.11.6/egg-dist-tmp-QkbfEY
warning: no previously-included files matching '*' found under directory 'docs/_templates'
warning: no previously-included files matching '*' found under directory 'docs/_build'
Adding virtualenv 1.11.6 to easy-install.pth file
Installing virtualenv script to /usr/local/bin
Installing virtualenv-2.7 script to /usr/local/bin

Installed /usr/local/lib/python2.7/dist-packages/virtualenv-1.11.6-py2.7.egg
Processing dependencies for virtualenv
Finished processing dependencies for virtualenv

$ virtualenv virt_env/virt1


$ source virt_env/virt1/bin/activate
(virt1)sanu@sanu-Inspiron-N5010:~$



Comments

Popular posts from this blog

AttributeError: Got AttributeError when attempting to get a value for field `abc` on serializer `PfleSerializer`. The serializer field might be named incorrectly and not match any attribute or key on the `QuerySet` instance. Original exception text was: 'QuerySet' object has no attribute 'abc'.

ImportError: No module named regex