Windows:
建议安装二进制版本,先装greenlet,再装gevent:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#greenlet
http://www.lfd.uci.edu/~gohlke/pythonlibs/#gevent
Ubuntu:
先编译安装libevent:
http://libevent.org/ e.g. https://github.com/downloads/libevent/libevent/libevent-2.0.17-stable.tar.gz
再安装greenlet:
可以用sudo easy_install greelet
最后编译安装gevent(或用sudo easy_install gevent),http://pypi.python.org/packages/source/g/gevent/gevent-0.13.6.tar.gz#md5=7c836ce2315d44ba0af6134efbcd38c9
如果遇到引入gevent模块时出现找不到libevent-2.0.so的错误,如下:
Python 2.7 (r27:82500, Jan 5 2012, 23:44:19)
[GCC 4.4.3] on linux3
Type "help", "copyright", "credits" or "license" for more information.
>>> import gevent
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build/bdist.linux-i686/egg/gevent/__init__.py", line 41, in <module>
File "build/bdist.linux-i686/egg/gevent/core.py", line 7, in <module>
File "build/bdist.linux-i686/egg/gevent/core.py", line 6, in __bootstrap__
ImportError: libevent-2.0.so.5: cannot open shared object file: No such file or directory
添加/usr/local/lib到LD_LIBRARY_PATH即可:
编辑~/.bashrc,在末尾加入:
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
保存,重新载入:source ~/.bashrc
呵呵,谢谢
VaTG790i.最好的<a href=http://www.kyfei.com>网站推广软件</a>,
非常好
....................
;ui;普i;uighur;ui;ui;个
在unix网络编程中看到了关于TCP/IP的一些内容,我感觉还是写的不够。正在下载中,一定
下载地址呢