mac 下 pip install 报 OSError: [Errno 1] Operation not permitted 的优雅解决方式

in pip •  7 years ago  (edited)

首先解释一下造成的原因:

由于El Capitan引入了SIP机制(System Integrity Protection),默认下系统启用SIP系统完整性保护机制,无论是对于硬盘还是运行时的进程限制对系统目录的写操作。

这也是我们安装 pip install xx 失败的原因。

在mac下碰到OSError: [Errno 1] Operation not permitted:的问题,即使用 sudo 也无法解决,那肯定是 sip 在作怪了.

那么如何解决呢?

pip install xxx –user -U

对就是通过在命令后面加上 –user -U
OK,完美解决。

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Congratulations @isme! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 1 year!

Click here to view your Board

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @isme! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!