CherryPy в Python2.7 ОС Centos7 64 бит - PullRequest
0 голосов
/ 05 марта 2019

Я пытаюсь сделать некоторые утилиты, используя CherryPy в Centos7 64bit.

Я получаю следующую ошибку при попытке запустить самый простой пример CherryPy:

$ cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"

$ python --version
Python 2.7.5

$ pip show CherryPy
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Name: CherryPy
Version: 17.4.1
Summary: Object-Oriented HTTP framework
Home-page: https://www.cherrypy.org
Author: CherryPy Team
Author-email: team@cherrypy.org
License: UNKNOWN
Location: /usr/lib64/python2.7/site-packages
Requires: more-itertools, contextlib2, cheroot, zc.lockfile, portend, six
Required-by:

$ cat example.py
# -*- coding: utf-8 -*-

import cherrypy

class HelloWorld(object):
        @cherrypy.expose
        def index(self):
                return "Hello World!"

cherrypy.quickstart(HelloWorld())

$ python example.py
Traceback (most recent call last):
  File "example.py", line 3, in <module>
    import cherrypy
  File "/usr/lib64/python2.7/site-packages/cherrypy/__init__.py", line 73, in <module>
    from ._cptools import default_toolbox as tools, Tool
  File "/usr/lib64/python2.7/site-packages/cherrypy/_cptools.py", line 33, in <module>
    from cherrypy.lib import auth_basic, auth_digest
  File "/usr/lib64/python2.7/site-packages/cherrypy/lib/auth_digest.py", line 27, in <module>
    from six.moves.urllib.request import parse_http_list, parse_keqv_list
ImportError: cannot import name parse_http_list
...