Programing

Windows에서 pip 설치 액세스가 거부되었습니다.

lottogame 2020. 8. 31. 08:17
반응형

Windows에서 pip 설치 액세스가 거부되었습니다.


pip install mitmproxyWindows에서 실행하려고 하는데 옵션을 사용 cmd하고 PowerShell사용 하더라도 계속 액세스가 거부 Run as Administrator됩니다.

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'

이 작업을 어떻게 할 수 있습니까?


Windows의 경우 cmd에서 python 실행 파일을 사용하여 pip install을 실행하십시오.

예 :

python -m pip install mitmproxy

이것은 적어도 다른 패키지 설치를 위해 나를 위해 일했습니다.


다음과 같이 Python 설치 폴더의 보안 권한을 변경합니다.

  1. Python 셸 열기
  2. 작업 관리자로 이동
  3. 파이썬 프로세스 찾기
  4. 마우스 오른쪽 버튼을 클릭하고 위치를 엽니 다.
  5. 폴더가 탐색기에서 열리고 디렉토리 위로 이동합니다.
  6. 폴더를 마우스 오른쪽 버튼으로 클릭하고 속성을 선택합니다.
  7. 보안 탭을 클릭하고 '수정'을 누르십시오.
  8. 모든 사람을 추가하고 읽기 및 쓰기 권한을 부여합니다.
  9. 변경 사항 저장

cmd관리자로 여는 경우 ; 그런 다음 다음을 수행 할 수 있습니다.

Python이에서 설정된 경우 PATH:

python -m pip install mitmproxy

개인적 cmd으로 관리자열면 python -m pip install mitproxy 문제가 해결 되는 것 같습니다.

참고 :- 나는 파이썬을 통해 설치했습니다.chocolatey


이전 답변에서 다루지 않았으며 종종 Windows에서 문제를 일으키고 관리자로 실행하더라도 일부 패키지를 설치하지 못하게 한 추가 사항은 일부 파일을 사용하는 다른 프로그램이 있으면 동일한 권한 거부 오류가 발생한다는 것입니다. (또는 pip install) 액세스를 시도하십시오. 이것은 예를 들어 일부 파일을 이동하려고 할 때 여러 번 나타나는 Windows의 정말 어리석은 "기능"입니다.

또한 어떤 프로그램이 특정 파일을 잠그는 지 알아내는 방법에 대한 단서가 없으므로 가장 쉬운 방법은 무엇이든 시작하기 전에 재부팅하고 설치를 수행하는 것입니다. 특히 Spyder 또는 기타 Python 기반 소프트웨어를 실행하기 전에 수행하는 것입니다. 모든 프로그램을 닫으려고 할 수도 있지만 실제로 어떤 프로그램이 파일을 보유하고 있는지 아는 것은 까다로울 수 있습니다. 예를 들어 디렉토리의 경우 해당 디렉토리에 탐색기 창이 열려 있으면 충분합니다.


"관리자 권한으로 실행"으로 cmd를 열고 명령을 실행합니다 pip install mitmproxy. 그것을 설치합니다.


python 폴더에 대한 모든 권한을 부여하십시오.

Python 루트 디렉토리-> 오른쪽 버튼 클릭-> 속성-> 보안-> 편집-> 사용자에게 모든 권한 부여-> 예를 찾고 프로세스가 완료 될 때까지 기다립니다.

그것은 나를 위해 작동합니다.


폴더를 c:\\users\\bruno\\appdata\\local\\temp\\easy_install-0fme6u수동으로 삭제 한 다음 pip 명령을 다시 시도하십시오.


관리자 권한으로 명령 프롬프트 열기 Python 실행 파일을 사용하지 않고 나를 위해 일했습니다. 명령 프롬프트 바로 가기를 마우스 오른쪽 버튼으로 클릭하고 "관리자 권한으로 실행"을 선택합니다. 그런 다음 다음 명령을 실행하십시오.

pip install Django

제 경우에는 관련 라이브러리를 가져 오는 jupyter 노트북이 열려있었습니다. 근본 원인은 파일이 열려 있거나 사용 중이기 때문에 Windows 오류 인 것 같습니다 (@Robert의 답변 및 재부팅 권장 사항 참조).

그래서 확인해야 할 또 다른 것은 다른 파이썬 프로세스가 실행되고 있지 않다는 것입니다.

나를 위해 노트북 서버를 종료하면 문제가 해결되었습니다.


나는 내 경우 .IN 아나콘다 프롬프트를 통해 설치하고, 그것은이 심지어 작동하지 않았다 python -m pip install그 후, 나는이 추가

python -m pip install <package_name> --user

그것은 나를 위해 작동합니다.

처럼: python -m pip install "numpy-1.15.4+mkl-cp36-cp36m-win_amd64.whl" --user

Note that double quote is not necessary you can give the package name you want to install.

Another you should try that run the Command Prompt as Run as Administrator and then try pip install. It should work either.


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 -> +.


I met a similar problem.But the error report is about

[SSL: TLSV1_ALERT_ACCESS_DENIED] tlsv1 alert access denied (_ssl.c:777)

First I tried this https://python-forum.io/Thread-All-pip-install-attempts-are-met-with-SSL-error#pid_28035 ,but seems it couldn't solve my problems,and still repeat the same issue.

And Second if you are working on a business computer,generally it may exist a web content filter(but I can access https://pypi.python.org through browser directly).And solve this issue by adding a proxy server.

For windows,open the Internet properties through IE or Chrome or whatsoever ,then set valid proxy address and port,and this way solve my problems

Or just adding the option pip --proxy [proxy-address]:port install mitmproxy.But you always need to add this option while installing by pypi

The above two solution is alternative for you demand.


Just close all the python files opened. And try to run as administrator. It will work.

e.g.

pip install numpy

In my case, it didn't even work with python -m pip install

What I have done is, from a cmd as administrator:

PsExec.exe -i -s -d cmd.exe

In order to spawn a SYSTEM cmd, then pip install mitmproxy

;)


Run cmd.exe as an administrator then type:

python -m pip install

참고URL : https://stackoverflow.com/questions/31172719/pip-install-access-denied-on-windows

반응형