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: Pip Permissions Error overwriting pip directory
Type: behavior Stage: resolved
Components: Installation, Windows Versions: Python 3.9
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: mcriley821, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2021-01-28 05:26 by mcriley821, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg385838 - (view) Author: Charley Riley (mcriley821) Date: 2021-01-28 05:26
After installing Python 3.9.1 on Windows 10 system-wide to "C:\Program Files\Python39", I tried to pip install the package 'dirsearch'.

pip refused with the error: "Defaulting to user installation because normal site-packages is not writeable", and proceeded to write to Local AppData (unwanted, so I deleted from AppData).

I changed the permissions of the site-packages folder to allow python access (allowed Users and Application Packages full control). 

Then I retried installing 'dirsearch', which now completed successfully. However, I was warned that my pip version was out of date. So I did:
>>> py -m pip install --upgrade pip
I ensured py --version = 3.9.1

This failed with "ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\\program files\\python39\\scripts\\pip.exe'

I then allowed same permissions as site-packages to the scripts folder. 

>>> py -m pip install --upgrade pip
and I get an error:
"C:\Program Files\Python39\python.exe: No module named pip"

I navigate to site-packages, where pip directories have been renamed as:
msg385891 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-01-29 00:55
This is better reported at, as it will be fixed out of their repository and then updated into here.

Seems like the failed install did not roll back properly. Those directories are the backup of the uninstallation so that if it fails, they can be restored. It's not obvious why that didn't work here.
Date User Action Args
2022-04-11 14:59:40adminsetgithub: 87217
2021-01-29 00:55:10steve.dowersetstatus: open -> closed
resolution: third party
messages: + msg385891

stage: resolved
2021-01-28 05:26:33mcriley821create