在 Mac OS XI 上嘗試使用 brew 安裝的 Python 2.7 創(chuàng)建 virtualenv 時出現(xiàn)以下錯誤: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.7Also creating executable in /Users/alexharvey/git/home/sam-test/virtualenv/bin/pythonInstalling 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/virtualenv_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 我看到以前經(jīng)常在這里問這樣的問題(例如這里),但贊成的答案似乎建議使用sudo,這顯然是錯誤的。請注意,我已遵循此頁面上的建議:在 Mac OS X 上有效使用 python。我該如何解決這個問題(不使用 sudo)?
Errno 13 運行 virtualenv 時權(quán)限被拒絕
慕田峪9158850
2021-09-25 14:32:02