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