Python: How to setup virtualenv

If you want to try new packages in python but do not want to disturb the default system python installation,  or if you want to try different version of a python package for your test purpose then virtualenv is the solution.

# apt-get install python-virtualenv
# pip install virtualenv
$ virtualenv myvirtualfolder
$ virtualenv 
$ source myvirtualfolder/bin/activate
# Notice that the shell prompt change
(myvirtualfolder)$
 
# Notice that the shell prompt change
(myvirtualfolder)$deactivate
$ 
apt-get install python-pip
pip install flask
pip install python-uinput




2 thoughts on “Python: How to setup virtualenv

Leave a Reply

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