python pyev 安装

来源:互联网 发布:外交部段子 知乎 编辑:程序博客网 时间:2024/06/04 20:06

http://pythonhosted.org/pyev/index.html


libev is an event loop: you register interest in certain events (such as a file descriptor being readable or a timeout occurring), and it will manage these event sources and provide your program with events.

pyev — Python libev interface.


所以安装pyev 前先要安装libev, 注意libev的版本




STEP 1]

下载 libev(官网没能进的去。。。),http://download.csdn.net/detail/lincoln_2012/9718078 ,从CSDN下一个

STEP 2]

       下载 pyev,https://pypi.python.org/pypi/pyev/

         

STEP 3]

安装libev

         3-1 解压 tar zxvf  libev-4.15.tar.gz

 3-2  cd libev-4.15;    ./configure;     make;     make install (root 权限)

STEP 4]

       安装 pyev

         4-1 tar zxvf pyev-0.9.0.tar.gz

         4-2  cd pyev-0.9.0;  python setup.py install


报错:

OSError: libev.so.4: cannot open shared object file: No such file or directory

解决:

       vi /etc/ld.so.conf, 添加/usr/local/lib, 再输入ldconfig

     示例:

include ld.so.conf.d/*.conf
/usr/local/lib
      

    再次到pyev解压目录:python setup.py install


Done!

       








0 0