[英]Errno 13 Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-18954.pth'
I've downloaded python 3.6.1 and I'm trying to use terminal to setup beautifulsoup4 but it keeps trying to install on python 2.7.我已经下载了 python 3.6.1,我正在尝试使用终端来设置beautifulsoup4,但它一直试图在 python 2.7 上安装。 Any help?
有什么帮助吗?
Jakes-iMac:beautifulsoup4-4.5.3 Jake$ cd /Users/Jake/Downloads/beautifulsoup4-4.5.3 Jakes-iMac:beautifulsoup4-4.5.3 Jake$ python setup.py install running install Jakes-iMac:beautifulsoup4-4.5.3 Jake$ cd /Users/Jake/Downloads/beautifulsoup4-4.5.3 Jakes-iMac:beautifulsoup4-4.5.3 Jake$ python setup.py install running install
Checking .pth file support in /Library/Python/2.7/site-packages/
检查
/Library/Python/2.7/site-packages/
.pth 文件支持
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-18954.pth'
The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was:您指定的安装目录(通过 --install-dir、--prefix 或 distutils 默认设置)是:
/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.
如果安装目录是系统拥有的目录,您可能需要以管理员或“root”帐户登录。 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.
如果您没有对这台机器的管理访问权限,您可能希望选择不同的安装目录,最好是在您的 PYTHONPATH 环境变量中列出的目录。
For information on other options, you may wish to consult the documentation at:有关其他选项的信息,您可能希望查阅以下文档:
https://pythonhosted.org/setuptools/easy_install.html https://pythonhosted.org/setuptools/easy_install.html
Please make the appropriate changes for your system and try again请对您的系统进行适当的更改,然后重试
默认情况下,在终端中运行“python”命令将在许多系统上运行 Python 2,即使您已经安装了 Python 3。请尝试改用“python3”命令。
尝试这个:
sudo python setup.py install
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.