技术前沿网
技术前沿网 找到你想要的开源项目,分享和交流
打开

osx10.11.1 上面sudo pip install 出现的问题

5

osx 10.11.1 最近这几天不知道出现什么问题了,sudo pip install 安装软件的时候,总有个提示,而且有些模块还没办法进行安装,以前没遇到过这样的情况 

The directory '/Users/weirdbird007/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

The directory '/Users/weirdbird007/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

 具体如图

error: could not create

'/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/greenlet': Operation not permitted


然后发现曾经执行过一条命令,不知道和这个是否有关

我来回答
精彩回答

引用来自“非知名隐退女尤”的评论

没看到 Operation not permitted 。 OS X10.11  开启了一个验证功能。 System、Usr目录 默认情况下不能操作的。

https://github.com/gevent/gevent/issues/679  

 

you can also use pip install --user

没看到 Operation not permitted 。 OS X10.11  开启了一个验证功能。 System、Usr目录 默认情况下不能操作的。

看提示应该是目录权限的问题,当前的用户无法进入目录

直接 sudo install xxx试试,



sudo easy_install gevent==1.1rc1

参考:

http://stackoverflow.com/questions/33437798/osx-10-11-1-cant-install-gevent


×