Fix Python – pip install access denied on Windows

Question

Asked By – Bruno Klein

I am trying to run pip install mitmproxy on Windows, but I keep getting access denied, even with cmd and PowerShell using the Run as Administrator option.

WindowsError: [Error 5] Access is denied: 'c:\\users\\bruno\\appdata\\local\\temp\\easy_install-0fme6u\\cryptography-0.9.1\\.eggs\\cffi-1.1.2-py2.7-win-amd64.egg\\_cffi_backend.pyd'

How can I make this work?

Now we will see solution for issue: pip install access denied on Windows


Answer

For Windows, in Command Prompt (Admin) try to run pip install using the Python executable:

python -m pip install mitmproxy

This should work, at least it worked for me for other package installation.

This question is answered By – nayak

This answer is collected from stackoverflow and reviewed by FixPython community admins, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0