Python和rrdtool

时间:2019-03-11 17:36:31

标签: python rrdtool

我创建了一个虚拟环境来开发我的python脚本。

当我尝试安装和导入rrdtool时出现错误:

安装:

(venv) pip install rrdtool
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting rrdtool
  Using cached https://files.pythonhosted.org/packages/21/cc/26370aad26cc2384c21717ef8773d1d9a1f8598e87b61fe72f89988370b0/rrdtool-0.1.14.tar.gz
    Complete output from command python setup.py egg_info:
    /tmp/tmp_python_rrdtoolmwzBMY/test_rrdtool.c:2:10: fatal error: rrd.h: No such file or directory
     #include <rrd.h>
              ^~~~~~~
    compilation terminated.
    Error: Unable to compile the binary module. Do you have the rrdtool header and libraries installed?

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-P2uKBK/rrdtool/
(venv) 

安装库后,我已在系统上成功安装了python rrdtool:

sudo apt-get install rrdtool python-rrdtool librrd-dev

我尝试将lib复制到我的venv文件夹中,但是没有用。如何将这些库安装到我的venv中?

0 个答案:

没有答案