pip install access denied on Windows

2020-01-23 10:25发布

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?

15条回答
地球回转人心会变
2楼-- · 2020-01-23 11:00

In case of windows, in cmd try to run pip install using python executable

e.g.

python -m pip install mitmproxy

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

查看更多
Juvenile、少年°
3楼-- · 2020-01-23 11:01

Personally, I found that by opening cmd as admin then run python -m pip install mitproxy seems to fix my problem.

Note:- I installed python through chocolatey

查看更多
爷的心禁止访问
4楼-- · 2020-01-23 11:01

Try to delete the folder c:\\users\\bruno\\appdata\\local\\temp\\easy_install-0fme6u manually and then retry the pip command.

查看更多
对你真心纯属浪费
5楼-- · 2020-01-23 11:02

When all else fails, try quitting your IDE. I had many cases in which PyCharm was causing this. As soon as I quit PyCharm, I was able to finally install my packages from the command line. Alternatively, you can also install through PyCharm itself in Settings -> Project: xxx -> Project Interpreter -> +.

查看更多
Melony?
6楼-- · 2020-01-23 11:07

Open cmd with "Run as administrator" and execute the command pip install mitmproxy. It will install it.

查看更多
地球回转人心会变
7楼-- · 2020-01-23 11:11

Try to give permission to full control the python folder.

Find the python root directory-->right button click-->properties-->security-->edit-->give users Full Control-->yes and wait the process finished.

It works for me.

查看更多
登录 后发表回答