2012-04-29 2 views
0

도움이 필요하십니까 .... 관리자 계정을 사용하여 beautifulsoup4-4.0.0b3을 설치하려고했지만 수천 번 실패했습니다. 내가 사용 Macpro OS X 라이온 아래 터미널에 무슨 일이 있었는지Mac OSX Admin 계정으로 Beautifulsoup 설치하기

10.7.2 :

내가 TEPYED : easy_install beautifulsoup4

는 응답 :

error: can't create or remove files in install directory 
The following error occurred while trying to add or remove files in 
the installation directory: 
[Errno 13] Permission denied: '/Library/Python/2.7/site-packages/ 
test-easy-install-411.write-test' 
The installation directory you specified (via --install-dir, --prefix, 
or the distutils default setting) was: 
    /Library/Python/2.7/site-packages/ 
Perhaps your account does not have write access to this directory? If 
the installation directory is a system-owned directory, you may need to 
sign in as the administrator or "root" account. If you do not have 
administrative access to this machine, you may wish to choose a different 
installation directory, preferably one that is listed in your PYTHONPATH 
environment variable. 
For information on other options, you may wish to consult the 
documentation at: 
    http://peak.telecommunity.com/EasyInstall.html 
Please make the appropriate changes for your system and try again. 

AND ITS로 자동 이 대화를 아지랑이로 반복 함 :

$ easy_install cd beautifulsoup4-4.0.0b3 
error: can't create or remove files in install directory 
The following error occurred while trying to add or remove files in 
the installation directory: 
    [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/ 
test-easy-install-415.write-test' 
The installation directory you specified (via --install-dir, --prefix, 
or the distutils default setting) was: 
    /Library/Python/2.7/site-packages/ 
Perhaps your account does not have write access to this directory? If 
the installation directory is a system-owned directory, you may need to 
sign in as the administrator or "root" account. If you do not have 
administrative access to this machine, you may wish to choose a different 
installation directory, preferably one that is listed in your PYTHONPATH 
environment variable. 
For information on other options, you may wish to consult the 
documentation at: 
    http://peak.telecommunity.com/EasyInstall.html 
Please make the appropriate changes for your system and try again. ` 

거의 나를 미치게합니다. 문제가 무엇인지 알아내는 데 도움을 주신 분께 감사드립니다.

답변

1

오류 permission denied은 쓰기 권한이 있다는 것을 보여 주므로 명령 앞에 sudo을 사용해야합니다.

이상, pip install beautifulsoup4virtualenv을 사용하면 sudo을 사용할 필요가 없습니다.

2

간편함 : sudo easy_install beautifulsoup4을 시도한 다음 관리자 암호를 입력하십시오.

난독 : virtualenv을 설정하는 것이 좋습니다. 일단 설치하면 관리자 암호없이 물건을 설치할 수 있습니다. 파이썬 설치를 망쳐 버리면 virtualenv를 삭제하고 다시 시작할 수 있기 때문에 또한 이점이 있습니다. (virtualenv를 설정하려면 Xcode가 설치되어 있어야하기 때문에 약간의 번거 로움이 될 수 있습니다.)