[Python-Dev] Proposing the deprecation of the pyvenv script

Barry Warsaw barry at python.org
Fri Sep 18 17:16:02 CEST 2015


On Sep 18, 2015, at 07:53 PM, Nick Coghlan wrote:

>I currently use pyvenv directly, but I agree with starting a migration
>to only supporting the more explicit "python -m venv". There's always
>an inherent ambiguity on *nix with unqualified version sensitive
>Python commands as to whether they're referring to Python 2 or 3, as
>the answer often depends on *how old* the particular script is  (e.g.
>pip and virtualenv relate to the Python 2 installation, while pyvenv
>relates to the Python 3 installation).

On Debian, we often use things like -2 or -3 suffixes, but there's no naming
standard, and you inevitably get to monstrosities like nose2-3. ;)   For
scripts which have to be Python-version specific, the slight loss of usability
for `python -m blah` outweighs the ambiguity and ugliness of the direct
alternative.

>There's one slightly oddity in the migration, which is that "pyvenv"
>will still run even if you're in an activated Python 2 virtual
>environment, while "python -m venv" fails. The answer is to use a
>qualified Python version in the latter call.

One thing that came up in a similar discussion is pip, and the suggested move to
`python -m pip`, which makes a lot of sense.  However, *inside* a virtualenv,
there's no ambiguity about the Python version associated with direct `pip`
invocation, so it still makes sense to install that there.

Cheers,
-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-dev/attachments/20150918/4ad339e0/attachment.sig>


More information about the Python-Dev mailing list