2017-09-26 1 views
-1

여기에서 신기한 실수. 자작 Mac에 Homebrew와 pip를 설치했지만 설치 중에 몇 가지 문제가있었습니다. 예를 들어, pip에 대해 Permissions가 거부되었습니다. 나는 Google에 가서 "sudo - H"해결책을 찾았습니다. 그러나 바퀴와 통나무를 사용할 수 없게하는 것에 관한 메시지가 있었고 실수로 종단을 그만 두었습니다.패키지 설치 중 pip 예외 발생

모든 것이 정상이거나 삭제하고 다시 설치하는 것이 가장 좋은 방법 인 것처럼 핍 및 홈 브루에게 상태 보고서를 보내는 명령이 있습니까?

편집 : 이 핍과 브루에 패키지를 설치하려고 제안이있어 w/O를 sudo는 -h :

Exception: 
Traceback (most recent call last): 
File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 215, in main 
status = self.run(options, args) 
File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 342, in run 
prefix=options.prefix_path, 
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 784, in install 
**kwargs 
File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 851, in install 
self.move_wheel_files(self.source_dir, root=root, prefix=prefix) 
File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files 
isolated=self.isolated, 
File "/Library/Python/2.7/site-packages/pip/wheel.py", line 345, in move_wheel_files 
clobber(source, lib_dir, True) 
File "/Library/Python/2.7/site-packages/pip/wheel.py", line 323, in clobber 
shutil.copyfile(srcfile, destfile) 
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 83, in copyfile 
with open(dst, 'wb') as fdst: 
IOError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/bellite.pyc' 

을하지만 그것은 내가에 관심이없는 나는 파이썬 2.7에 관련된 것 같다 모든. 내가 sudo는 -h를 사용하는 경우

, 내가 가지고 :

The directory '/Users/SimonOsipov/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. 
The directory '/Users/SimonOsipov/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. 

브루 설치 패키지를

+0

homebrew/pip를 통해 패키지를 설치하면 작동하는지 확인할 수 있습니다. – Lix

+1

양조 재부팅 명령을 시도해 볼 수 있습니다. – Pauloscorps

+0

패키지를 설치하십시오. 'pip'가 파일 권한에 관한 오류를 던지면 제대로 작동하지 않습니다. – jdno

답변

0

기본적으로 pip은 시스템 전체에 패키지를 설치하려고하기 때문에 Permission denied 오류가 발생합니다. 여기서 제대로 작동하는 것은 없습니다.

당신은 --user하여 자신의 사용자로 패키지를 설치할 수 있습니다 : 모든 괜찮처럼

pip install --user ... 

는 상태 보고서를 얻을 수있는 PIP와 브루에 대한 명령이 있는가 또는 삭제하고 다시 설치가 최선의 방법입니다 ?

홈 브루는 시스템의 잠재적 인 문제를 진단하는 데 도움이되는 brew doctor 명령을 가지고 있습니다. 제대로 작동하지 않으면 시작하는 것이 좋습니다. pip에는 없지만 최대 세 번까지 사용할 수있는 자세한 출력을 위해서는 -v 옵션을 지원합니다. 예 : pip install -vvv ....

0

시도 양조 설치 0 문제 (여기 패키지의 선택)와 함께. 그게 효과가 있다면, 그게 좋은거야.

pip 설치를 다시 시도하십시오 (패키지를 다시 선택하십시오). 그게 효과가 있다면, 당신은 아마 갈 수 있습니다.

둘 다 작동하지 않는 경우 추출과 껍질을 제거한 다음 다시 시작하십시오. 두 가지가 모두 효과가 있다면 잘 할 수 있습니다.

양조 정리, 양조장 업그레이드, 양조장 업데이트 및 양조 의사와 같은 명령에 익숙해 질 수도 있습니다.

희망이 있습니다.