Install Gevent on Mac OS X and Ubuntu systems

Source: Internet
Author: User

Error prompts for using PIP installation gevent in Mac OS x:

Fatal error: ' event.h ' File not found

This is because Gevent is built on top of the Libevent library and the Event.h header file must be installed in Libevent,libevent.

You can use MacPorts to install libevent, which commands the following:

sudo port install libevent

Then manually add event.h and libevent to the CFLAGS environment variable:

cflags= "-i/opt/local/include-l/opt/local/lib" pip install Gevent

Install Gevent in Ubuntu:

First install libevent, libevent.org download the latest stable version libevent-2.0.21-stable.tar.gz, extract the contents of the compressed package.

Into the unpacked folder:

ifantastic@ubuntu:~/libevent/libevent-2.0.12-stable$./configure
ifantastic@ubuntu:~/libevent/libevent-2.0.12-stable$ make
ifantastic@ubuntu:~/libevent/libevent-2.0.12-stable$ sudo make install

Next Install Gevent:

Ifantastic@ubuntu:sudo pip install gevent.

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/OS/other/

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.