2017-04-01 20 views
0

預先感謝您的任何指導(我聽說過有關sudo命令的混合建議?)。下面是從終端腳本:任何人都可以幫忙嗎?當我嘗試在Mac上安裝點時獲取「[Errno 13]權限被拒絕」

[Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-85961.pth'

+0

可能的重複[在Mac OS上安裝pip會導致Permission denied:'/Library/Python/2.7/site-packages/pip](http://stackoverflow.com/questions/24098736/installing-pip-on-mac -os-giving-permission-denied-library-python-2-7-site-pack) –

回答

4

您需要root權限才能裏面寫/庫:

running install
Checking .pth file support in /Library/Python/2.7/site-packages/
error: can't create or remove files in install directory

試圖添加或 安裝目錄中刪除文件時出現以下錯誤,因此,你必須發出安裝命令,作爲根:

sudo <command> 
+0

嗨!感謝您的權衡。這工作,但不久後,我試圖安裝一個Twitter庫使用$ pip安裝python-twitter和我有一個權限錯誤。我使用了$ sudo pip安裝python-twitter並得到了這個回覆: 目錄'/ Users/HannahLastName/Library/Caches/pip/http'或其父目錄不被當前用戶所有並且緩存已被禁用。請檢查該目錄的權限和所有者。如果用sudo執行pip,你可能需要sudo的-H標誌。 我的權限被關閉了嗎?任何幫助表示讚賞。 – HannahFromMontana

+0

如果我不斷收到權限錯誤,您認爲HomeBrew會比通過OS X運行更好嗎? – HannahFromMontana

0

好「命令」應該有工作,

sudo pip install <package-name> 

其次要確保你的點子被更新

sudo pip install --upgrade pip 

sudo運行PIP後,你可能會得到一個警告約「目錄不是由當前用戶擁有」可以忽略不計。

相關問題