-1

when i install gevent on osx 10.11.1 , it have a question ,i can't fix it .

This is a detailed process I installed

1: sudo port install libevent

2:sudo pip install greenlet

3:sudo pip install gevent

$:sudo pip install gevent

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

Here is a detailed description of the picture

I do not know where the problem lies, but I have a root privilege ofใ€‚

please help me,thanks~~

WeirdBird
  • 31
  • 2
  • Did you follow the advice in the error message? _"if executing pip with sudo you may want sudo's -H flag"_ โ€“ Bryan Oakley Oct 30 '15 at 14:21
  • yean , i had sudo pip install pip --upgrade ; and then , sudo -H pip install greenlet , It still Operation not permitted [link](http://77fya2.com1.z0.glb.clouddn.com/33.png) โ€“ WeirdBird Oct 30 '15 at 15:57

3 Answers3

4

Try :

sudo easy_install gevent==1.1rc1

But i would recommend using virtualenv

Coy
  • 3,703
  • 3
  • 14
  • 13
2

From the picture of your description, you failed to install greenlet. You can fix this by using easy_install.

First, install the greenlet==0.4.10:

sudo easy_install greenlet==0.4.10

The result is:

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

Then, install the gevent:

sudo -H pip install gevent

I met the same problem when I installed the Kafka on my Mac, and I had fixed it now.

CHENJIAN
  • 1,810
  • 13
  • 24
0

you can also use/try pip install --user <your_module>

Amazia Gur
  • 1,692
  • 17
  • 16