This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Windows installer: "Add to PATH" should be checked by default
Type: enhancement Stage: resolved
Components: Installation, Windows Versions: Python 3.10, Python 3.9, Python 3.8
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: cotree, eryksun, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2020-08-03 19:58 by cotree, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (3)
msg374752 - (view) Author: (cotree) Date: 2020-08-03 19:58
In the Windows installer, "Add Python 3.x to PATH" is unchecked by default:

If it's unchecked, then "python", "pip", and any other commands from installed packages (like django-admin, etc) will not work, which is quite important functionality. Searching on Google shows that "'python' is not recognized..." is a commonly asked about error. Many users leave that box unchecked because they don't know what PATH is and they tend to stick with the defaults recommended by the installer.

On the other hand, I think not wanting Python on your PATH is more of an advanced use case. The people who opt for this are more likely to know what PATH is in the first place, so it's reasonable to ask them to decide to uncheck it.
msg374773 - (view) Author: Eryk Sun (eryksun) * (Python triager) Date: 2020-08-04 00:06
Managing multiple Python installations in PATH is problematic, so by default the installer doesn't modify PATH. Instead, the "py.exe" launcher [1] is made available, which can run any registered installation of Python. 

Using a launcher fits the Windows environment better, which installs applications into separate subdirectories of "shell:ProgramFiles" or "shell:UserProgramFiles". This is similar to monolithic package installation in Unix into "/opt" or "~/.local/opt" (or "~/opt"). 

A recent update to the installer extends the message after a successful installation to suggest "[a]t your terminal, type 'py' to launch Python". It also includes a link to the "Using Python on Windows" documentation. Hopefully this will encourage more users to learn about and use the py launcher.

msg374827 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2020-08-04 15:32
As Eryk says, the defaults include the "py" launcher, which is now recommended at the end of installation. Python is also available from the Start menu/screen, and PEP 514 allows other tools to reliably detect and offer Python installs.

Modifying PATH at all is an advanced scenario, as it may cause other (unrelated) applications to stop working. Modifying PATH twice makes launching Python unreliable, and attempting to reverse the modification may leave the system in an unreliable state. We won't be changing the default.

People who install from the Microsoft Store will get all the shortcuts they expect (assuming they are already Linux experts, otherwise they have no expectations anyway), because we are able to update what appears on PATH more safely.
Date User Action Args
2022-04-11 14:59:34adminsetgithub: 85638
2020-08-04 15:32:31steve.dowersetstatus: closed
resolution: rejected
messages: + msg374827

stage: resolved
2020-08-04 00:26:58eryksunsetstatus: open -> (no value)
components: + Installation
versions: + Python 3.8, Python 3.9, Python 3.10
2020-08-04 00:06:53eryksunsetnosy: + eryksun
messages: + msg374773
2020-08-03 19:58:25cotreecreate