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.

classification
Title: When uninstalling Python under Windows the "Scripts" folders should be removed from the PATH environment variable
Type: enhancement Stage:
Components: Installation, Windows Versions: Python 3.10
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: lucatrv, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2021-12-02 22:36 by lucatrv, last changed 2022-04-11 14:59 by admin.

Messages (2)
msg407551 - (view) Author: Luca (lucatrv) * Date: 2021-12-02 22:36
This issue is related to:
  https://bugs.python.org/issue3561
and:
  https://bugs.python.org/issue45968

When installing Python under Windows, if the "Add Python 3.x to PATH" option is flagged, the following two folders are added to the PATH environment variable:
  %USERPROFILE%\AppData\Local\Programs\Python\Python3x\
  %USERPROFILE%\AppData\Local\Programs\Python\Python3x\Scripts\

However when uninstalling Pyhton only the former folder is removed from the PATH environment variable, and not the latter one.

Moreover if also the following folder will be added to the PATH environment variable in future (see issue #45968):
  %USERPROFILE%\AppData\Roaming\Python\Python3x\Scripts\
then the same would apply to it.
msg407564 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-12-03 00:30
Unless someone can find an authoring bug under Tools/msi, I don't think we can do anything about this. We rely on the built-in Windows support for adding and removing these variables, and if that's broken, we can't do anything with our current setup.

I really want to get us out of this addiction to cluttering up PATH with lots of different directories - it's bad for security/reliability/etc. of the system as a whole, and I don't like Python being the cause of issues here. But I haven't quite come up with the better design yet... 

Anyway, all that to say that I'm not in any rush to expand or seriously mess with the current PATH settings. If there's an authoring bug we can fix, great, but I don't think this one is on us in a way we can easily deal with.
History
Date User Action Args
2022-04-11 14:59:53adminsetgithub: 90127
2021-12-03 00:30:34steve.dowersetmessages: + msg407564
2021-12-02 22:36:06lucatrvcreate