[issue23623] Python 3.5 docs need to clarify how to set PATH, etc

New submission from Paul Moore: With Python 3.5 on Windows defaulting (for all users installs) to the read-only "Program Files" directory, and with "Add Python to PATH" having problems adding the per-user "user scripts" directory to PATH, the Python 3.5 documentation needs to explain the recommended practice for running Python 3.5 from the command line on Windows. Issues that should be covered include: - System installs with need to be run from an elevated prompt, are user installs now the recommended approach? (It's worth noting in that case that user installs re *not* recommended for older versions, as the user Scripts directory wasn't versioned until Python 3.5) - How to add the correct directories to PATH (including the user scripts directory) - for both CMD and powershell users and in an existing shell as well as a new one (i.e, no "Python command prompt" shortcuts!) - How to add the correct directories persistently, so they are available to all programs on startup. - While the "py" launcher solves the problem of running Python, and some modules via -m (such as pip), many packages install console scripts which do not have an equivalent -m invocation, so "use the launcher" is not a complete solution. The documentation should clarify where (or if) 3rd party documentation needs to comment on Windows path difficulties. For example, the pip documentation has for a long time said that the way to run pip is via the "pip" command, and until Python included the "Add to PATH" option in the installer, we regularly had to deal with user queries because the "pip" command didn't work out of the box - it would be unfortunate if Python 3.5 left 3rd parties back in that situation again. ---------- assignee: docs@python components: Documentation, Windows messages: 237650 nosy: docs@python, pmoore, steve.dower, tim.golden, zach.ware priority: release blocker severity: normal status: open title: Python 3.5 docs need to clarify how to set PATH, etc versions: Python 3.5 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue23623> _______________________________________

Changes by David Linke <dr.david.linke@gmail.com>: ---------- nosy: +dalito _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue23623> _______________________________________

Changes by Ethan Furman <ethan@stoneleaf.us>: ---------- nosy: +ethan.furman _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue23623> _______________________________________

Steve Dower added the comment: FYI, the docs in the Python 3.5.0a2 CHM are newer than what's on docs.p.o, specifically the "Using Python on Windows" section. (Apparently I need to do something other than commit changes to get the website updated?) https://hg.python.org/cpython/file/tip/Doc/using/windows.rst The section on setting environment variables has been updated since 3.4, but it could be extended further. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue23623> _______________________________________

Paul Moore added the comment: At a minimum, the example should show adding setting the 2 script directories to PATH, and not just sys.prefix. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue23623> _______________________________________

Ned Deily added the comment: Steve, how does https://docs.python.org/dev/using/windows.html look now? (There may have been an update lag.) ---------- nosy: +ned.deily _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue23623> _______________________________________

Steve Dower added the comment: Looks good, thanks Ned. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue23623> _______________________________________

Changes by Ned Deily <nad@acm.org>: ---------- nosy: -ned.deily _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue23623> _______________________________________

David Linke added the comment: Besides clarifying documentation, it may be helpful to provide a script that (temporarily) sets the path to pythonX and pythonX/scripts. A batch cmd script that does that and also changes the default Python for the launcher is here: https://gist.github.com/dalito/8356483ac2ffb2b8b468 The Python version is specified just like for the launcher: "pypath -3.4" temporarily sets the path for Python34 and Python34/scripts and "pypath" restores the previous state. The script uses the launcher to get the location of the specified Python version. I think some of the problem above could be mitigated by including such cmd/powershell script(s). ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue23623> _______________________________________

Paul Moore added the comment: Steve has something like that planned, I believe. It's been discussed a couple of times on python-dev ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue23623> _______________________________________

Steve Dower added the comment: "Planned" is a bit strong - in need of some simultaneous time and motivation :) Thanks for the upvote. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue23623> _______________________________________

Changes by Ezio Melotti <ezio.melotti@gmail.com>: ---------- nosy: +ezio.melotti _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue23623> _______________________________________

Changes by Larry Hastings <larry@hastings.org>: ---------- priority: release blocker -> deferred blocker _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue23623> _______________________________________

Changes by Ethan Furman <ethan@stoneleaf.us>: ---------- nosy: -ethan.furman _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue23623> _______________________________________

Larry Hastings added the comment: Can we close this out? ---------- nosy: +larry _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue23623> _______________________________________

Paul Moore added the comment: Now that "Add Python to PATH" is an option on the front screen of the installer (not hidden behind the scary "customize" option) this can be closed. I recall Steve suggesting there might be issues with the way a user install results in the path entries coming after the system path, but let's not worry about those unless we get specific issue reports. ---------- priority: deferred blocker -> normal resolution: -> fixed status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue23623> _______________________________________
participants (7)
-
David Linke
-
Ethan Furman
-
Ezio Melotti
-
Larry Hastings
-
Ned Deily
-
Paul Moore
-
Steve Dower