error: could not create '/System/Library/Frameworks/Python.framework/Versions/2.7/share': Operation not permitted


參考:

error: could not create '/System/Library/Frameworks/Python.framework/Versions/2.7/share': Operation not permitted

在OSX下用pip安裝networkx時報錯:

error: could not create '/System/Library/Frameworks/Python.framework/Versions/2.7/share': Operation not permitted

原因:因為EI Captain引入了SIP管理機制,所以舊版本的pip創建的文件目錄操作被拒絕,包括使用root也是如此。

解決方法是:

sudo pip install networkx --user

加上--user參數解決問題。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM