【发布时间】:2017-09-25 21:43:13
【问题描述】:
我已经下载了 python 3.6.1,我正在尝试使用终端设置 beautifulsoup4,但它一直试图在 python 2.7 上安装。有什么帮助吗?
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 运行安装
检查/Library/Python/2.7/site-packages/中的.pth文件支持
error: can't create or remove files in install directory
在尝试添加或删除文件时出现以下错误 安装目录:
[Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-18954.pth'
您指定的安装目录(通过 --install-dir、--prefix 或 distutils 默认设置)是:
/Library/Python/2.7/site-packages/
也许您的帐户没有对该目录的写入权限?如果 安装目录是系统拥有的目录,可能需要登录 作为管理员或“root”帐户。如果你没有行政 访问本机,不妨选择不同的安装方式 目录,最好是 PYTHONPATH 环境中列出的目录 变量。
有关其他选项的信息,您不妨咨询 文档位于:
https://pythonhosted.org/setuptools/easy_install.html
请对您的系统进行适当的更改,然后重试
【问题讨论】:
-
你能澄清一下'使用终端设置'吗?你在用点子吗?您应该检查是否使用 pip 是 3.xx python 版本的 pip 。如果您使用的是easy_install,则相同,请确保正在执行正确的python版本。
标签: python python-2.7 beautifulsoup