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

Attachment: pgpltiap26Kr2.pgp
Description: OpenPGP digital signature

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to