Using a particular python binary with venv
Laura Creighton
lac at openend.se
Mon Jun 1 17:45:39 EDT 2015
In a message of Mon, 01 Jun 2015 14:33:56 -0700, greenbay.graham at gmail.com writ
es:
>According to this https://docs.python.org/3.4/library/venv.html#module-venv 'Each virtual environment has its own Python binary (allowing creation of environments with various Python versions)'
>So how would I create a virtual environment using the venv module that has a Python 2.7 binary?
>tia
>g
>--
>https://mail.python.org/mailman/listinfo/python-list
#If you haven't already got it
pip install virtualenv
#Then
cd where_I_want_to_work
virtualenv -p /usr/bin/python2.7 venv
source venv/bin/activate
pip install packages_i_need
# when you are done
deactivate
to get back to your system python.
Laura
More information about the Python-list
mailing list