开发者

cherrypy importerror on python3.2

I installed python3.2&cherrypy3.2 on my centos5.5, but when I tried to run helloworld I got the following message:

Traceback (most recent call last):   File "/usr/local/lib/python3.2/site-packages/cherrypy/_cpcompat.py", line 179, in <module>
        from Cookie import SimpleCookie, CookieError ImportError: No module named Cookie

During handling of the above exception, another exception occurred:

Traceback (most recent call last):   File "tut01_helloworld.py", line 8, in <module>
        import cherrypy   File "/usr/local/lib/python3.2/site-packages/cherrypy/__init__.py",开发者_Go百科 line 62, in <module>
        from cherrypy._cpcompat import urljoin as _urljoin, urlencode as
    _urlencode   File "/usr/local/lib/python3.2/site-packages/cherrypy/_cpcompat.py", line 185, in <module>
        from http.client import BadStatusLine, HTTPConnection, HTTPSConnection, IncompleteRead, NotConnected ImportError: cannot import name HTTPSConnection

Is anything wrong?


You can't import the HTTPSConnection module, which I suspect means that you are missing SSL support in your Python. To get that you probably need to install the openssl development package for your Linux distro.

Like, for example on Ubuntu:

 sudo apt-get install libssl-dev
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜