![](/img/trans.png)
[英]What's causing this error when I try and install virtualenv? IOError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/virtualenv.py'
[英]Errno 13 Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-18954.pth'
我已經下載了 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 running 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
請對您的系統進行適當的更改,然后重試
默認情況下,在終端中運行“python”命令將在許多系統上運行 Python 2,即使您已經安裝了 Python 3。請嘗試改用“python3”命令。
嘗試這個:
sudo python setup.py install
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.