Concurrence系列-安装

 

Concurrence的安装还是比较正常的(比那些编译时报出100个error的东西好多了)。

 

我试了两个平台,有奔头(8.x,企业版),和Mac(leopard), 

有奔头下,

 

 

可能需要

apt-get install python-dev

apt-get install libevent-dev

 

 

 

easy_install pyrex

 

 

easy_install concurrence

如果这里遇到错误,说不定可以这样解决:

 

python -c "from Pyrex.Compiler import Scanning;Scanning.get_lexicon()"

然后再easy_install concurrence
顺便说一下:
Pyrex lets you write code that mixes Python and C data types any way you want, and compiles it into a C extension for Python. 

然后:

easy_install greenlet

greenlet 可以... lightweight in-process concurrent programming

 

 

 

此外,可能需要的python包有:

 

easy_install simplejson

 

easy_install routes

easy_install webob

 

 

 

 

 

当然,你可以把concurrence 运行在 stackless上(而不是greenlet)稍微快一点而已,

 

 

Mac下:

几乎一样。

 

 

如果能运行下面的代码,就说明可以了:

 

 

from concurrence import dispatch

 

def hello():

    print "Hello World!"

 

if __name__ == '__main__':

    dispatch(hello)  

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值