在 Mac OS XI 上尝试使用 brew 安装的 Python 2.7 创建 virtualenv 时出现以下错误:
Could not install packages due to an EnvironmentError:
[Errno 13] Permission denied: '/lib'
完整输出:
▶ virtualenv ./virtualenv
New python executable in /Users/alexharvey/git/home/sam-test/virtualenv/bin/python2.7
Also creating executable in /Users/alexharvey/git/home/sam-test/virtualenv/bin/python
Installing setuptools, pip, wheel...
Complete output from command /Users/alexharvey/gi...ualenv/bin/python2.7 - setuptools pip wheel:
Looking in links: /usr/local/lib/python2.7/site-packages, /usr/local/lib/python2.7/site-packages/virtualenv_support, /usr/local/lib/python2.7/site-packages/virtualen
v_support
Collecting setuptools
Using cached https://files.pythonhosted.org/packages/37/06/754589caf971b0d2d48f151c2586f62902d93dc908e2fd9b9b9f6aa3c9dd/setuptools-40.6.3-py2.py3-none-any.whl
Collecting pip
Collecting wheel
我看到以前经常在这里问这样的问题(例如这里),但赞成的答案似乎建议使用sudo,这显然是错误的。
请注意,我已遵循此页面上的建议:在 Mac OS X 上有效使用 python。
我该如何解决这个问题(不使用 sudo)?
翻阅古今
梵蒂冈之花
相关分类