[Python-ideas] venv *is* provided in the standard Python install on Debian/Ubuntu

Antoine Pitrou antoine at python.org
Sun Nov 12 14:31:25 EST 2017


Hi Stephan,

Le 12/11/2017 à 20:24, Stephan Houben a écrit :
> Hi Antoine,
> 
> The venv module is included,
> however the pyvenv script is in a separate package
> python3.5-venv .

Thanks for the correction.  That's definitely a silly decision --
especially as the "pyvenv" script must be very small anyway, perhaps
even smaller than the package metadata that goes with it?

It's not even internally consistent within Debian, as the "pyvenv"
script is packaged separately but the "pydoc" script is bundled with the
"python package":

$ dpkg -S `which pyvenv`
python3-venv: /usr/bin/pyvenv
$ dpkg -S `which pydoc`
python: /usr/bin/pydoc

(note also how "pyvenv" and not "pyvenv3" is installed by
"python3-venv"...)

> So many questions:
> * What is the status of "pyenv" in 3.5? Apparently it is not deprecated
> there.
> * What is it replaced by? Apparently "venv", but it doesn't say so
> explicitly.
> * Is "venv" the same thing as "python -m venv" discussed earlier? Or is it a
>   different thing? With so many things names so similarly, it is hard to
> tell

I guess so... Personally, I don't think that deprecation was a good
idea.  As Nick says, there is point to be made for short
easy-to-remember commands such as "pyvenv" or "pip install".

> * What does it mean for "venv" to be recommend in 3.5 if "pyvenv" is not
> deprecated there?

Probably that "python -m venv" is the recommended replacement.

> I suppose at that point the newbie gave up and downloaded node.js ;-)

Perhaps not a good idea, but hey :-))

Regards

Antoine.


More information about the Python-ideas mailing list