我尝试使用以下命令在 Ubuntu 12.04.3 服务器下安装 CherryPy:
sudo python3.3 setup.py install
似乎一切都很好。
但是在运行测试时:
python3.3 -c "import cherrypy"
它给出了一个错误:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python3.3/dist-packages/cherrypy/__init__.py", line 82, in <module>
from cherrypy import process
File "/usr/local/lib/python3.3/dist-packages/cherrypy/process/__init__.py", line 14, in <module>
from cherrypy.process import plugins, servers
File "/usr/local/lib/python3.3/dist-packages/cherrypy/process/plugins.py", line 424, in <module>
class PerpetualTimer(threading._Timer):
AttributeError: 'module' object has no attribute '_Timer'
当做同样的事情时
python2.7 -c "import cherrypy"
它没有输出。
会是什么呢?
最好的问候,列昂尼德