• python2.7下安装cherrypy问题


    将CentOS下的python版本升级到python2.7,通过easy_install安装cherrypy没问题,但在使用cherrypy的时候却出错。
    import cherrypy时报出错误如下:

    Traceback(most recent call last):
       
    File"<stdin>", line 1,in<module>
       
    File"/usr/local/lib/python2.7/site-packages/cherrypy/__init__.py", line 62,in<module>
         
    from cherrypy._cpcompat import urljoin as _urljoin, urlencode as _urlencode
       
    File"/usr/local/lib/python2.7/site-packages/cherrypy/_cpcompat.py", line 184,in<module>
         
    from http.cookies importSimpleCookie,CookieError
    ImportError:Nomodule named http.cookies

    google之后才知道是缺少因为python中ssl支持,具体解决方法如下:
    (1)yum install openssl-devel
    (2)重新编译安装python

    参见:
    http://stackoverflow.com/questions/6643052/importerror-no-module-named-http-cookies-error-when-installing-cherrypy-3-2
  • 相关阅读:
    Css_加载样式
    Mvc4_@RenderBody()和@RenderSection()
    C#_观察者模式
    Mvc4_MvcPager 概述
    Mvc4_Area的应用
    Nginx 服务器性能参数设置
    Nginx变量的实现机制
    天下无雾
    Nginx Http框架的理解
    【转】websocket协议规范
  • 原文地址:https://www.cnblogs.com/Jerryshome/p/2234498.html
Copyright © 2020-2023  润新知