Python 3.6 installation doesn't add launcher to PATH

ChrisW c.c.wood at gmail.com
Sun Feb 26 10:09:33 EST 2017


On Saturday, 25 February 2017 07:21:30 UTC, eryk sun  wrote:
> On Fri, Feb 24, 2017 at 12:38 PM, ChrisW wrote:
> > However, I've installed Python 3.6 with the 'include PATH' checkbox ticked
> > for my user only, and although C:\Windows\py.exe exists, it has not been
> > added to my PATH.
> >
> > I also tried installing for all users, and this also doesn't add it to the PATH.
> >
> > Is this a bug, or have I done something wrong?!
> 
> What the installer adds to PATH is the Python36[-32] directory that
> has python.exe and the Scripts directory that has pip.exe. The
> recommended way to run Python is via the "python" command not "py".
> The py launcher is mainly for shell executing script files with
> shebang processing. That said people do use py -X[-Y[-32]] as a
> convenient way to run multiple versions of Python without modifying
> PATH.
> 
> As to adding SystemRoot to PATH, it should be there already. This
> doesn't matter if the program lets CreateProcess search because it
> always searches system directories before PATH. But it matters in a
> common case; cmd.exe does its own search and only searches PATH (and
> also the current directory if the system is configured insecurely).

Hmm, that seems to contradict what the docs say: `py` is recommended for Windows users who want to run various versions (not just for executing scripts).  SystemRoot is not in my PATH variable.



More information about the Python-list mailing list