【问题标题】:python cherrypy installationpython 樱桃安装
【发布时间】:2018-10-25 12:35:45
【问题描述】:

我正在尝试在 Ubuntu 上运行带有cherrypy的python。

我通过安装python

sudo apt-get update
sudp apt-get install python3.6

和cherrypy通过

git clone https://github.com/cherrypy/cherrypy
cd cherrypy
python setup.py install

但是当我尝试通过

python -m cherrypy.tutorial.tut01_helloworld

我收到错误消息“找不到名为 parse 的模块”。 通过运行它

python3.6 -m cherrypy.tutorial.tut01_helloworld

导致错误“找不到名为 cherrypy 的模块”。

【问题讨论】:

    标签: python cherrypy


    【解决方案1】:

    python 调用 Python 2.7。 parse 在此版本中不可用。 CherryPy 无法导入,因为 CherryPy 的路径不在您的sys.path 中。最好通过 pip 安装 CherryPy。 CherryPy > 17.4.0 仅适用于 Python 3!

    【讨论】:

      猜你喜欢
      • 2011-01-02
      • 1970-01-01
      • 2012-12-07
      • 2012-07-06
      • 2011-12-06
      • 2010-09-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多