【发布时间】:2015-02-24 20:35:49
【问题描述】:
我在 Ubuntu 14.04 中使用虚拟环境 Python3.4,并且我的 Django webapp 运行没有任何问题。我希望能够监控请求/流量等,但是当我尝试安装 Graphite-Web(通过在 venv 中运行 pip install Graphite-web)时,我得到以下信息:
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 graphe-web 安装,它会安装但它显示在 python 2.7 下。
现在我的问题是,有没有办法让这些东西一起工作(即使它们需要不同版本的 python)?
【问题讨论】:
-
一切都使用 Python 2.7?
-
不幸的是,我必须使用 3.4。
-
那么你必须要么放弃graphite-web作为依赖,要么自己去更新它以兼容Python3。对不起。
标签: python django python-2.7 python-3.x graphite