[issue32553] venv says to use python3 which does not exist in 3.6.4
New submission from Paul Watson <paul.hermeneutic@gmail.com>: The 3.6.4 documentation on venv specifies using 'python3', but no python3 executable is in the 3.6.4 kit. https://docs.python.org/3/library/venv.html?highlight=venv#module-venv ---------- assignee: docs@python components: Documentation messages: 309943 nosy: Paul Watson, docs@python priority: normal severity: normal status: open title: venv says to use python3 which does not exist in 3.6.4 type: enhancement versions: Python 3.6 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32553> _______________________________________
Mariatta Wijaya <mariatta.wijaya@gmail.com> added the comment: People who has more than one Python versions installed will have python3. ---------- nosy: +Mariatta _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32553> _______________________________________
Ned Deily <nad@python.org> added the comment: Unfortunately, it may depend on what environment and/or from which distributor you obtain Python 3.6 as to whether there is a "python3" link installed. On Unix-like systems, the default Python installation built from source ("make install") does install both "python3.6" and "python3" links in the configured "bin" directory. But that may not be true everywhere. On what environment are you running Python 3.6 and from where was it installed? ---------- nosy: +ned.deily _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32553> _______________________________________
Paul Watson <paul.hermeneutic@gmail.com> added the comment: I am running 3.6.4 from a download on pythong.org yesterday. Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:54:40) [MSC v.1900 64 bit (AMD64)] on win32 There is a python3.dll, but no python3 executable. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32553> _______________________________________
Change by Ned Deily <nad@python.org>: ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32553> _______________________________________
Ned Deily <nad@python.org> added the comment: Thanks! Pinging the Windows team. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32553> _______________________________________
Paul Moore <p.f.moore@gmail.com> added the comment: Actually, for Windows, the docs don't recommend "python3", they say: """ On Windows, invoke the venv command as follows: c:\>c:\Python35\python -m venv c:\path\to\myenv """ This should probably be altered to say "py -m venv" (or maybe "py -3 -m venv", but I don't think that's really necessary), as using the launcher is less tied to having your PATH set, or using an explicit path. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32553> _______________________________________
Paul Watson <paul.hermeneutic@gmail.com> added the comment: Ok, I do find later on where it says to do something different on Windows. However, the first "Note" box in "28.3. venv" specifies using "python3". It does not say that this is for non-Windows systems. This should be changed. Also, the path specified, "c:\Python35\python", would not be the default location for a Windows install. "C:\Program Files\Python36\python" or "C:\Program Files (x86)\Python36\python" should be specified. I detest that it is this complex and verbose, but it is. Glossing over it does not help the user. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32553> _______________________________________
Paul Moore <p.f.moore@gmail.com> added the comment: That's why I suggest using the launcher rather than absolute paths - there are far too many variations to enumerate with absolue paths (you didn't mention per-user Python 3.6 installations, for example). If you have a suggested wording that you feel would explain things better, feel free to propose it. What's there at the moment seems relatively OK to me (aside from a minor tweak to use the launcher) so I'm not sure I could modify it in a way that would address your concerns. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32553> _______________________________________
Eryk Sun <eryksun@gmail.com> added the comment: `PATHEXT` is irrelevant here, so that should be removed. As to the py launcher, it's optional and not always installed for all users, though that's the default. I'd prefer `python` that's found in PATH as the first example. Then add another example with `py -X.Y` to show how to create virtual environments for other versions. ---------- nosy: +eryksun _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32553> _______________________________________
Paul Moore <p.f.moore@gmail.com> added the comment: Agreed, the docs don't need to mention PATHEXT. I don't have a machine to hand with Python 3.6 not installed, to check, but I believe the launcher is installed by default (although as you say it can be deselected - and it's definitely described as "recommended") whereas adding Python to PATH is deselected by default. So "py" is more likely to work on a typical installation than "python". As I say, though, I have no feel here for the right level of detail. Maybe something like """ To execute the venv command, use python -m venv Unix installations typically name the Python 3.x executable "python3", and on Windows the "py" launcher is generally available even if the Python interpreter is not on your PATH, so you may need to substitute the appropriate means of invoking Python in place of the "python" command above. """ But that's (to my mind) still wordy and complex - and the new users I've spoken to already find the docs too full of confusing detail. Ideally, I'd prefer it if "Invoking Python" were described once and for all in a separate section of the docs (i.e., the "Python Setup and Usage" manual) and everywhere else in the official documentation we simply used "python", with no qualifications, on the understanding that this stands for "whatever you use on your PC to run Python". I suspect that would generate complaints from a lot of people, though, as most people hit the doc pages via direct links, not by reading the manuals in order... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32553> _______________________________________
Terry J. Reedy <tjreedy@udel.edu> added the comment: As far as I know, Windows binaries have only been named python.exe or pythonw.exe. Before 3.5, I believe, "C:\Pythonxy", where x,y were major,minor, *was* the default Windows installation directory. 'Python35' must have been the result of a mechanical update. ---------- nosy: +terry.reedy _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32553> _______________________________________
Change by Eryk Sun <eryksun@gmail.com>: ---------- title: venv says to use python3 which does not exist in 3.6.4 -> Use the py launcher in venv Windows examples versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.6 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue32553> _______________________________________
participants (6)
-
Eryk Sun
-
Mariatta Wijaya
-
Ned Deily
-
Paul Moore
-
Paul Watson
-
Terry J. Reedy