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参数解决问题。

posted @ 2017-12-04 09:41  Wasdns  阅读(3330)  评论(0编辑  收藏  举报