Python 使用Mac OSX管理员帐户安装Beautifulsoup
需要帮助。。。。 我尝试了很多次使用管理员帐户来安装beautifulsoup4-4.0.0b3,但是失败了很多次。我使用Macpro OS X Lion 10.7.2 航站楼发生的情况如下: 当我点击时:Python 使用Mac OSX管理员帐户安装Beautifulsoup,python,macos,installation,beautifulsoup,easy-install,Python,Macos,Installation,Beautifulsoup,Easy Install,需要帮助。。。。 我尝试了很多次使用管理员帐户来安装beautifulsoup4-4.0.0b3,但是失败了很多次。我使用Macpro OS X Lion 10.7.2 航站楼发生的情况如下: 当我点击时:easy\u安装beautifulsoup4 答复: error: can't create or remove files in install directory The following error occurred while trying to add or remove fil
easy\u安装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.
它会自动重复这个对话:
$ 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. `
这几乎让我发疯。谢谢大家帮我弄清楚是什么
问题是 错误
权限被拒绝
表明您确实拥有写入权限,因此您需要在命令前面使用sudo
使用
sudo-easy\u-install-beautifulsoup4
或更好的方法,pip-install-beautifulsoup4
with而不必使用sudo
错误权限被拒绝
表明您确实拥有写入权限,因此您需要在命令前使用sudo
使用
sudo-easy\u-install-beautifulsoup4
或更好的方法,pip-install-beautifulsoup4
with而不必使用sudo
easy:尝试sudo-easy\u-install-beautifulsoup4
,然后键入管理员密码
更难:我建议建立一个。一旦你设置好了,你就可以在没有管理员密码的情况下安装东西了。这也是有利的,因为如果你搞砸了Python的安装,你可以删除virtualenv然后重新开始。(您确实需要安装XCode来设置virtualenv,因此可能会有点麻烦)简单:尝试
sudo Easy\u install beautifulsoup4
,然后键入管理员密码
更难:我建议建立一个。一旦你设置好了,你就可以在没有管理员密码的情况下安装东西了。这也是有利的,因为如果你搞砸了Python的安装,你可以删除virtualenv然后重新开始。(您确实需要安装XCode来设置virtualenv,因此可能有点麻烦)