Home » Python » Using Virtualenvwrapper on Ubuntu

Using Virtualenvwrapper on Ubuntu

Install Python setuptool

sudo apt-get install python-setuptools python-pip

Install virtualenvwrapper through pip

sudo pip install virtualenvwrapper

create virtual envs directory

mkdir -p ~/.virtualenvs

add virtualenv variable to bash file

echo 'export WORKON_HOME=~/.virtualenvs' >> ~/.bashrc
echo 'source /usr/local/bin/virtualenvwrapper.sh' >> ~/.bashrc

source bash file

source ~/.bashrc

create virtual environment named ‘testgit’

mkvirtualenv testgit

using virtualenv ‘testgit’

workon testgit

quit virtualenv and back to os environment

deactivate

remove virtualenvs

rmvirtualenv testgit

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*

*