-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pip install Windows registry error Access is denied #12769
Comments
We can add a internal utility function which wraps |
Ensure you are using the latest version of pip. Sometimes, updating pip can resolve unexpected issues: Use the below command python -m pip install --upgrade pip |
Since the issue is caused by restricted registry keys, you might need to temporarily restore access to these keys: Open the Registry Editor (regedit). 1.Navigate to the problematic keys, such as HKEY_CLASSES_ROOT.gdoc. |
@georgepr0xy This was on a fresh install of Python 3. I tried to update pip, but due to pip quitting on the first registry error, it was unable to update itself. Temporarily changing the reg key permissions is what I did to get around the issue for now. |
Since pip is failing due to registry errors, manually updating pip might help:
|
You might consider modifying the pip source code temporarily to skip over registry keys it can't access. This is a bit more advanced and involves editing the pip package files: Locate pip installation: Modify the code: |
@georgepr0xy Are you copying and pasting AI responses? If so, I ask that it stops as it simply serves to add noise to this issue, failing to provide a proper solution to this issue. |
Modify the permissions of the problematic registry keys to grant read access temporarily, install the package, and then revert the permissions. Alternatively, run the pip installation with elevated privileges using an Administrator command prompt. |
You can first navigate to the directory by opening the terminal/commandprompt using admin account[run as administrator] and then go and try that again the same error i encountered and did this (it worked ) |
Description
When installing a package using pip, it fails with the error:
PermissionError: [WinError 5] Access is denied
. I used Process Monitor to trace the error to a registry key it couldn't access. Instead of pip skipping the inaccessible key and continuing the installation, it failed. It was failing over 3 registry keys I had earlier removed my own access to to prevent Google Drive from constantly recreating new ShellNew entries (a known and very annoying issue with GD), one of them isHKEY_CLASSES_ROOT\.gdoc
. Not sure why pip is enumerating all the entries inHKEY_CLASSES_ROOT
but I think it should skip any it can't access.Expected behavior
For the install to successfully complete. If pip can't access a registry key in
HKEY_CLASSES_ROOT
it should skip and continue.pip version
24.0
Python version
3.12.4
OS
Windows 11
How to Reproduce
HKEY_CLASSES_ROOT
by marking the Administrators group with Deny permission for Full Control and Read.Output
Code of Conduct
The text was updated successfully, but these errors were encountered: