0

我正在尝试使用https://github.com/somic/graphite-rabbitmq将 RabbitMQ 连接到 Graphite(0.9.9) 但是,我不完全确定应该放置 Graphite 中的哪个目录 Graphite-rabbitmq 文件。

当我跑步时,carbon-agent-rabbitm1.py我得到

Failed to import the graphite package. Please verify that this package
was properly installed and that your PYTHONPATH environment variable
includes the directory in which it is installed.

For example, you may need to run the following command:

export PYTHONPATH="/home/myusername/lib/python/:$PYTHONPATH"

非常感谢您的帮助

4

2 回答 2

0

除非您有使用该 github 存储库中的脚本的特定原因,否则我不会,因为它们似乎已经有 3 年历史了,并且石墨现在通过 Twisted Python AMQP 库 (txamqp) 支持 RabbitMQ,它使这些脚本完全没有必要。

于 2012-06-28T11:14:34.917 回答
0

与 python 模块的约定,您可以将下载的文件放在任意临时目录中,cd 进入该目录,然后运行:

python setup.py install

标准distutils包将确保一切都到达正确的位置。

您可能还想下载pip它将为您管理下载和安装这些软件包的过程,在这种情况下,您只需键入:

pip install graphite-web

但除此之外,你真的可以把文件放在任何地方,只要你将目录添加到一个名为 PYTHONPATH 的环境变量中,就像你引用的错误消息所说的那样。

于 2012-06-26T13:22:20.437 回答