How can I install the Python library 'gevent' on Mac OS X Lion

前端 未结 10 689
灰色年华
灰色年华 2020-12-22 19:03

Python library gevent, version 0.13.6 (the current version on PyPI) will not pip install on OS X Lion, Python 2.7 (and probably others.) It works f

10条回答
  •  温柔的废话
    2020-12-22 19:54

    I use virtualenv and virtualenv wrapper, and so I wanted this to be self contained. I got gevent working like so:

    Assuming you have virtual env setup, then:

    workon {my_virtual_env}
    

    Then download libevent and install it against the virtualenv.

    curl -L -O https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
    
    tar -xzf libevent-2.0.21-stable.tar.gz
    cd libevent-2.0.21-stable
    ./configure --prefix="$VIRTUAL_ENV"
    make && make install
    

    I'm assuming you've got gcc 5+ installed (I use brew)

    Hope this helps.

提交回复
热议问题