osx 10.11.1无法安装gevent

时间:2015-10-30 14:00:03

标签: python gevent

当我在osx 10.11.1上安装gevent时,它有一个问题,我无法解决它。

这是我安装的详细过程

1:sudo port install libevent

2:sudo pip install greenlet

3:sudo pip install gevent

$:sudo pip install gevent

错误:无法创建'/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/greenlet':不允许操作

Here is a detailed description of the picture

我不知道问题出在哪里,但我有root权限。

请帮助我,谢谢~~

3 个答案:

答案 0 :(得分:3)

尝试:

sudo easy_install gevent==1.1rc1

但我建议使用virtualenv

答案 1 :(得分:1)

根据您的说明图片,您未能安装 greenlet 。您可以使用 easy_install 修复此问题。

首先,安装 greenlet == 0.4.10

sudo easy_install greenlet==0.4.10

结果是:

Searching for greenlet==0.4.10
Reading https://pypi.python.org/simple/greenlet/
Best match: greenlet 0.4.10
Downloading     https://pypi.python.org/packages/f2/3f/09412b656067f280cf017ce5b6465e6339089129212425111117be5557d9/greenlet-0.4.10.tar.gz#md5=5351f8ac5196a00d835c2cb1faf75270
Processing greenlet-0.4.10.tar.gz
Writing /tmp/easy_install-per91O/greenlet-0.4.10/setup.cfg
Running greenlet-0.4.10/setup.py -q bdist_egg --dist-dir /tmp/easy_install-per91O/greenlet-0.4.10/egg-dist-tmp-5b4Om0
creating /Library/Python/2.7/site-packages/greenlet-0.4.10-py2.7-macosx-10.12-intel.egg
Extracting greenlet-0.4.10-py2.7-macosx-10.12-intel.egg to  /Library/Python/2.7/site-packages
Adding greenlet 0.4.10 to easy-install.pth file

Installed /Library/Python/2.7/site-packages/greenlet-0.4.10-py2.7-macosx-10.12-intel.egg
Processing dependencies for greenlet==0.4.10
Finished processing dependencies for greenlet==0.4.10

然后,安装 gevent

sudo -H pip install gevent

我在Mac上安装 Kafka 时遇到了同样的问题,我现在已经修好了。

答案 2 :(得分:0)

您还可以使用/尝试pip install --user <your_module>