Search code examples
pythonpip

pip Access denied Windows 10


When attempting to do absolutely anything using pip in the terminal, I instantly receive the message "Access is denied." No other messages, just "Access is denied." I've tried using administrator terminal, going to different directories, but the same issue happens. I have attempted to run "python -m pip install --upgrade pip" from looking at a solution in a different question but it said pip is up to date and no change occurred. I can get around installing using the "python -m pip install (something)" command but I would like to know the cause of this issue and how to resolve it so it doesn't impede me in future when I try doing something other than installing with pip. Any ideas? Help is greatly appreciated, thank you :)

I'm running Python 3.6 and Windows 10.

So sorry if this is a duplicate question, I've spent a while attempting to see if the answer is already here but for the most part they appear to all be for a different OS or have a different error. Of course, I could have been searching using the wrong query but like Jon Snow, I know nothing, especially about technical stuff.

EDIT: I've gone into the pip.exe files locations and have adjusted security permissions so that any user on my device has full control, still no luck. Many reboots have been done but no luck there either. I can't seem to log into the admin account in terminal as it doesn't accept my password, even though I am the sole account and an admin account.


Solution

  • This is a problem with windows defender blocking pip for some reason.

    The solution is to make an exception for the python folder (appdata/local/programs) if you used the default install location.

    To add an exception:

    1. Go to Start > Settings > Update & Security > Windows Security > Virus & threat protection
    2. Under Virus & threat protection settings, select Manage settings, and then under Exclusions, select Add or remove exclusions.

    and select the python folder. I also added my virtual environments just in case.