error when python pip install rrdtool on windows 7

假装没事ソ 提交于 2020-01-14 05:55:07

问题


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

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\

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.

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

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\

回答1:


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.



来源:https://stackoverflow.com/questions/41046222/error-when-python-pip-install-rrdtool-on-windows-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!