Python 3 virtualenvs

Carl Meyer carl at oddbird.net
Mon Nov 30 12:28:46 EST 2015


On 11/30/2015 10:20 AM, Laura Creighton wrote:
> In a message of Mon, 30 Nov 2015 09:32:27 -0700, Carl Meyer writes:
>>> I think it is only meant to be used by people who want to install
>>> packages but not site-wide, but I am not sure about that.
>>
>> I don't know what you mean by this either. Isn't the ability to "install
>> packages but not site-wide" precisely what virtualenv (and venv) give you?
> 
> I rarely use it for that.  What I nearly always want is different
> python interpreters.  CPython, PyPy, Jython for anything from 2.6 to
> 3.6.

If you just want the variety of interpreters, virtualenv doesn't give
you that -- you have to already have a given interpreter installed
system-wide for virtualenv to be able to use it. What virtualenv gives
you is isolated environments for package installations (which can use
any interpreter you have installed).

Venv does the same (and won't have any trouble with PyPy or Jython
either, once they reach Python 3.3 compatibility).

So I agree that for now you should be sticking with virtualenv (I use it
too), but I hope you'll take another look at venv a few years down the
road, if you find yourself in a situation where all the interpreters you
need are 3.3+.

(Or maybe virtualenv will make the transition sooner, and you'll start
using venv under the hood for 3.3+ without even realizing it.)

Carl

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


More information about the Python-list mailing list