无法在ubuntu12.04下使用python3.3安装CherryPy(can't install CherryPy with python3.3 under ubuntu12.04)

编程入门 行业动态 更新时间:2024-10-28 09:24:53
无法在ubuntu12.04下使用python3.3安装CherryPy(can't install CherryPy with python3.3 under ubuntu12.04)

我尝试使用命令在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"

它没有输出。

会是什么呢?

最好的问候,列昂尼德

I tried to install CherryPy under Ubuntu 12.04.3 server with command:

sudo python3.3 setup.py install

It seems that everything was fine.

But when running test:

python3.3 -c "import cherrypy"

it gives an error:

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'

When doing the same with

python2.7 -c "import cherrypy"

it gives no output.

What could it be?

Best regards, Leonid

最满意答案

“Timer类在Python 3.3中从_Timer重命名为Timer”

https://bitbucket.org/cherrypy/cherrypy/issue/1163/attributeerror-in-cherrypyprocessplugins

希望这可以帮助!

I have downloaded CherryPy 3.2.3 from python.org (https://pypi.python.org/pypi/CherryPy/3.2.3) instead of 3.2.2 taken from cherrypy.org (http://download.cherrypy.org/cherrypy/3.2.2/) used before and run installation process once more.

Now it works for some reason...

更多推荐

本文发布于:2023-07-24 17:18:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1248826.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:install   CherryPy

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!