[New-bugs-announce] [issue43051] Pip Permissions Error overwriting pip directory

Charley Riley report at bugs.python.org
Thu Jan 28 00:26:33 EST 2021

New submission from Charley Riley <mcriley821 at gmail.com>:

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:

components: Installation, Windows
messages: 385838
nosy: mcriley821, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Pip Permissions Error overwriting pip directory
type: behavior
versions: Python 3.9

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list