我尝试使用命令:
在Ubuntu 12.04.3服务器下安装CherryPysudo 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"
它没有输出。
它可能是什么?
祝你好运, 列昂尼德
答案 0 :(得分:0)
&#34; Timer类在Python 3.3&#34;
中从_Timer重命名为Timerhttps://bitbucket.org/cherrypy/cherrypy/issue/1163/attributeerror-in-cherrypyprocessplugins
希望这有帮助!
答案 1 :(得分:0)
我已经从python.org(https://pypi.python.org/pypi/CherryPy/3.2.3)下载了CherryPy 3.2.3,而不是从之前使用的cherrypy.org(http://download.cherrypy.org/cherrypy/3.2.2/)获取的3.2.2,并再次运行安装过程。
现在它出于某种原因......
答案 2 :(得分:0)
我和Cherrypy一起工作,我和Mako一起用终端写作来安装它:
sudo apt-get install subversion python-mako python-simplejson python-cherrypy3 graphviz
我在site内找到,您可以将其保存在书签的浏览器中。
安装更简单,更快