Using a particular python binary with venv

Carl Meyer carl at oddbird.net
Mon Jun 1 17:42:33 EDT 2015


On 06/01/2015 03:33 PM, greenbay.graham at gmail.com wrote:
> 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?

You can't. The venv module only exists in and supports Python 3.3+.

If you need to support earlier Django versions, you'll need to use the
older "virtualenv" library instead, which looks very similar from the
end-user side. See https://virtualenv.pypa.io/en/latest/

Carl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20150601/697eb788/attachment.sig>


More information about the Python-list mailing list