Python 让RabbitMQ和Graphite连接

Python 让RabbitMQ和Graphite连接,python,django,rabbitmq,graphite,Python,Django,Rabbitmq,Graphite,我正在尝试使用以下命令将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 va

我正在尝试使用以下命令将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"

非常感谢您的帮助

根据python模块的约定,您只需将下载的文件放入任意临时目录,然后将cd放入该目录,然后运行:

python setup.py install
标准的
distutils
包将确保所有东西都放在正确的位置

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

pip install graphite-web

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

除非您有在github repo中使用脚本的特定原因,我不这么认为,因为它们看起来已经3年了,graphite现在通过TwistedPythonAMQP库(txamqp)支持RabbitMQ,这使得这些脚本完全没有必要