我正在尝试使用https://github.com/somic/graphite-rabbitmq将RabbitMQ连接到Graphite(0.9.9),但是,我不能完全确定graphite-rabbitmq文件应该放在Graphite中的哪个目录。
当我运行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"如果能帮上忙,我们将不胜感激
发布于 2012-06-26 21:22:20
按照python模块的约定,您只需将下载的文件放入任意的临时目录,将cd放入该目录,然后运行:
python setup.py install标准的distutils包将完成确保所有内容到达正确位置的工作。
您可能还想下载pip,它将为您管理下载和安装这些包的过程,在这种情况下,您只需键入:
pip install graphite-web但除此之外,您真的可以将文件放在任何地方,只要将目录添加到名为PYTHONPATH的环境变量中,就像您引用的错误消息所说的那样。
发布于 2012-06-28 19:14:35
除非你有一个明确的理由使用github存储库中的脚本,否则我不会,因为它们似乎已经有3年的历史了,而且石墨现在通过Twisted Python AMQP库(txamqp)支持RabbitMQ,这使得这些脚本完全不必要。
https://stackoverflow.com/questions/11205820
复制相似问题