python pip在Windows 7上安装rrdtool时出错 [英] error when python pip install rrdtool on windows 7

查看:562
本文介绍了python pip在Windows 7上安装rrdtool时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行Windows 7 64位,Python v2.7.10和pip v9.0.1

I am running windows 7 64 bit, Python v2.7.10 and pip v9.0.1

我尝试安装rrdtool但出现错误

I tried to install rrdtool but I get an error

    PS C:\Windows\system32> pip install rrdtool
Collecting rrdtool
  Using cached rrdtool-0.1.11.tar.gz
    Complete output from command python setup.py egg_info:
    test_rrdtool.c
    c:\users\person\appdata\local\temp\tmp_python_rrdtoolvwty3u\test_rrdtool.c(2) : fatal error C1083: Cannot open incl
ude file: 'rrd.h': No such file or directory
    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 c:\users\person\appdata\local\temp\pip-build-pyontu\rrdt
ool\

我也尝试安装python-rrdtool但出现错误

I also tried to install python-rrdtool but got an error

    PS C:\Users\person\Downloads> pip install python-rrdtool
Collecting python-rrdtool
  Using cached python-rrdtool-1.4.7.tar.gz
Installing collected packages: python-rrdtool
  Running setup.py install for python-rrdtool ... error
    Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\person\
\appdata\\local\\temp\\pip-build-ykegvz\\python-rrdtool\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.re
ad().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\person\appdata\lo
cal\temp\pip-w44bef-record\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_ext
    running build_configure
    building 'rrdtoolmodule' extension
    creating build
    creating build\temp.win-amd64-2.7
    creating build\temp.win-amd64-2.7\Release
    creating build\temp.win-amd64-2.7\Release\rrdtool-1.4.7
    creating build\temp.win-amd64-2.7\Release\rrdtool-1.4.7\bindings
    creating build\temp.win-amd64-2.7\Release\rrdtool-1.4.7\bindings\python
    C:\Users\person\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /O
x /MD /W3 /GS- /DNDEBUG -Irrdtool-1.4.7/src -Ic:\python27\include -Ic:\python27\PC /Tcrrdtool-1.4.7/bindings/python/rrdt
oolmodule.c /Fobuild\temp.win-amd64-2.7\Release\rrdtool-1.4.7/bindings/python/rrdtoolmodule.obj
    rrdtoolmodule.c
    rrdtool-1.4.7/bindings/python/rrdtoolmodule.c(41) : fatal error C1083: Cannot open include file: '../../rrd_config.h
': No such file or directory
    error: command 'C:\\Users\\person\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin
\\amd64\\cl.exe' failed with exit status 2

    ----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\person\\appdata\\local\\temp\\p
ip-build-ykegvz\\python-rrdtool\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n
');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\person\appdata\local\temp\pip-w44bef-reco
rd\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\person\appdat
a\local\temp\pip-build-ykegvz\python-rrdtool\

我也使用管理员权限运行安装,但得到相同的错误.

I ran the installation using admin privileges as well but get the same error.

我需要使用rrdtool解析一些rrd文件并创建图,但是我无法使用pip安装此存档.

I need to parse some rrd files using the rrdtool and create graphs but I just cannot install this archive using pip.

我是python的新手,所以我不确定该怎么做.

I am a newbie with python so I am not sure how to go about this.

我尝试使用从仍然有错误

I tried to install it using tar.gz file downloaded from https://pypi.python.org/pypi/python-rrdtool/1.4.7 still got an error

PS C:\Users\person\Downloads> pip install .\python-rrdtool-1.4.7.tar.gz
Processing c:\users\person\downloads\python-rrdtool-1.4.7.tar.gz
Installing collected packages: python-rrdtool
  Running setup.py install for python-rrdtool ... error
    Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\person\
\appdata\\local\\temp\\pip-hpkobh-build\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r
\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\person\appdata\local\temp\pip-b3z
3rd-record\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_ext
    running build_configure
    building 'rrdtoolmodule' extension
    creating build
    creating build\temp.win-amd64-2.7
    creating build\temp.win-amd64-2.7\Release
    creating build\temp.win-amd64-2.7\Release\rrdtool-1.4.7
    creating build\temp.win-amd64-2.7\Release\rrdtool-1.4.7\bindings
    creating build\temp.win-amd64-2.7\Release\rrdtool-1.4.7\bindings\python
    C:\Users\person\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /O
x /MD /W3 /GS- /DNDEBUG -Irrdtool-1.4.7/src -Ic:\python27\include -Ic:\python27\PC /Tcrrdtool-1.4.7/bindings/python/rrdt
oolmodule.c /Fobuild\temp.win-amd64-2.7\Release\rrdtool-1.4.7/bindings/python/rrdtoolmodule.obj
    rrdtoolmodule.c
    rrdtool-1.4.7/bindings/python/rrdtoolmodule.c(41) : fatal error C1083: Cannot open include file: '../../rrd_config.h
': No such file or directory
    error: command 'C:\\Users\\person\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin
\\amd64\\cl.exe' failed with exit status 2

    ----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\person\\appdata\\local\\temp\\p
ip-hpkobh-build\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exe
c(compile(code, __file__, 'exec'))" install --record c:\users\person\appdata\local\temp\pip-b3z3rd-record\install-recor
d.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\person\appdata\local\temp\pip
-hpkobh-build\

推荐答案

您可以从网站 然后转到带有.tar.gz的文件夹并执行命令pip install python-rrdtool-1.4.7.tar.gz

You can download it manually from website then go to folder with .tar.gz and execute command pip install python-rrdtool-1.4.7.tar.gz

您还可以尝试从>此处下载它,并解压缩并开始文件.

You can also try to download it from here unzip and start .exe file.

这篇关于python pip在Windows 7上安装rrdtool时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆