带有 python3.4 和 Graphite-web 的 Django

Django with python3.4 and Graphite-web

我在 Ubuntu 14.04 中使用虚拟环境 Python3.4,我有一个 Django webapp 运行,没有任何问题。我希望能够监控请求/流量等,但是当我尝试安装 Graphite-Web 时(通过 运行 pip install graphite-web inside the venv)我得到以下信息:

Collecting graphite-web
  Using cached graphite-web-0.9.13.tar.gz
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/tmp/pip-build-koiz44ft/graphite-web/setup.py", line 63, in <module>
        data_files=webapp_content.items() + storage_dirs + conf_files + examples,
    TypeError: unsupported operand type(s) for +: 'dict_items' and 'list'
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

      File "<string>", line 20, in <module>

      File "/tmp/pip-build-koiz44ft/graphite-web/setup.py", line 63, in <module>

        data_files=webapp_content.items() + storage_dirs + conf_files + examples,

    TypeError: unsupported operand type(s) for +: 'dict_items' and 'list'

    ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-koiz44ft/graphite-web

看起来这是由于 python 版本,因为如果我退出 venv(停用)并尝试使用 sudo apt-get install graphite-web 安装,它会安装,但它显示在python2.7.

现在我的问题是,有没有办法让这些东西协同工作(即使它们需要不同版本的 python)?

似乎 graphite-web 目前没有 Python 3 支持(参见 check-dependencies 脚本)。你必须 运行 它与 Python 2.7.