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
# Notice that the shell prompt change
apt-get install python-pip
pip install flask
pip install python-uinput

3 thoughts on “Python: How to setup virtualenv

Leave a Reply

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