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

Stephan Houben stephanh42 at gmail.com
Mon Nov 13 03:00:32 EST 2017


Hi all,

Related to this text on https://docs.python.org/3/library/venv.html :

============
 Note
  The pyvenv script has been deprecated as of Python 3.6 in favor of
  using python3 -m venv to help prevent any potential confusion as to
  which Python interpreter a virtual environment will be based on.
============

It's clearer than the text below to which I originally referred.

However,  this text has also problems in that it is too unix-specific.
In particular:
* Most seriously, it refers to "python3" which doesn't work with the
python.org Windows installer.
* Less seriously, it refers to "pyenv" as a "script" which is unix jargon
and moreover technically
   incorrect on Windows. (Also, needlessly specific, it should just be "the
pyenv command",
  how it is implemented is irrelevant for this section).

Stephan

2017-11-13 0:32 GMT+01:00 Chris Angelico <rosuav at gmail.com>:

> On Mon, Nov 13, 2017 at 10:29 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> > On 13 November 2017 at 07:11, Chris Angelico <rosuav at gmail.com> wrote:
> >> On Mon, Nov 13, 2017 at 6:24 AM, Stephan Houben <stephanh42 at gmail.com>
> wrote:
> >>> Hi Antoine,
> >>>
> >>> The venv module is included,
> >>> however the pyvenv script is in a separate package
> >>> python3.5-venv .
> >>>
> >>> By the way, I was totally confused by the following text form the doc.
> >>>
> >>> https://docs.python.org/3/library/venv.html
> >>>
> >>> ========
> >>> Deprecated since version 3.6: pyvenv was the recommended tool for
> creating
> >>> virtual environments for Python 3.3 and 3.4, and is deprecated in
> Python
> >>> 3.6.
> >>>
> >>> Changed in version 3.5: The use of venv is now recommended for creating
> >>> virtual environments.
> >>>
> >>> ========
> >>
> >> Not sure where you're reading that. I'm seeing:
> >>
> >> """
> >> Note
> >> The pyvenv script has been deprecated as of Python 3.6 in favor of
> >> using python3 -m venv to help prevent any potential confusion as to
> >> which Python interpreter a virtual environment will be based on.
> >> """
> >>
> >> I think that's pretty clear. "python3 -m venv env" is the standard and
> >> recommended way to spin up a virtual environment.
> >
> > It's further down in the page, under
> > https://docs.python.org/3/library/venv.html#creating-
> virtual-environments
> >
> > I think the deprecation notice for pyvenv should just be deleted,
> > since it renders like the *module* is deprecated.
>
> Ah, I see it now, thanks.
>
> Agreed; or maybe downgrade it to a parenthetical comment. Focus on
> "this is how to do the obvious thing", and only as an afterthought
> mention "it used to be done differently" in case someone greps for
> pyvenv.
>
> ChrisA
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20171113/9863ed8d/attachment.html>


More information about the Python-ideas mailing list