【发布时间】:2018-10-16 18:06:42
【问题描述】:
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/beautifulsoup4-4.6.0.dist-info'Consider using the `--user` option or check the permissions.
上面的错误是我尝试使用 pip 命令时遇到的错误。我需要做的就是 pip install the requirements.txt 让我的程序正常工作。我安装了 python 2.7.1 并将我的代码放在我可以使用 python 命令的地方。我尝试使用以下命令更改权限:
chmod -R 777
但它不起作用。我的电脑上安装了自制软件。我还尝试使用此链接使用虚拟环境: http://sourabhbajaj.com/mac-setup/Python/virtualenv.html 但它也给了我权限问题。有什么建议可以摆脱这个权限问题并成功运行 pip 吗?下面的 sudo 命令也不起作用。
sudo pip install -r requirements.txt
【问题讨论】:
标签: python macos python-2.7 permissions pip