Error when installing python pyminizip module and zlib.dll - python

I am trying to install the python pyminizip module on my PC but i have the fallowing error :
C:\Python27\Scripts>pip install pyminizip
Collecting pyminizip
Using cached pyminizip-0.2.1.tar.gz
Installing collected packages: pyminizip
Running setup.py install for pyminizip ... error
Complete output from command c:\python27\python.exe -u -c "import setuptools
, tokenize;__file__='c:\\users\\andrei~1.gug\\appdata\\local\\temp\\pip-build-mb
aaft\\pyminizip\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.re
ad().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" inst
all --record c:\users\andrei~1.gug\appdata\local\temp\pip-9hqnfh-record\install-
record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
building 'pyminizip' extension
creating build
creating build\temp.win32-2.7
creating build\temp.win32-2.7\Release
creating build\temp.win32-2.7\Release\src
C:\Users\Andrei-Cristian.GUGI\AppData\Local\Programs\Common\Microsoft\Visual
C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Isrc -Ic
:\python27\include -Ic:\python27\PC /Tcsrc/py_minizip.c /Fobuild\temp.win32-2.7\
Release\src/py_minizip.obj
py_minizip.c
c:\users\andrei-cristian.gugi\appdata\local\temp\pip-build-mbaaft\pyminizip\
src\zip.h(43) : fatal error C1083: Cannot open include file: 'zlib.h': No such f
ile or directory
error: command 'C:\\Users\\Andrei-Cristian.GUGI\\AppData\\Local\\Programs\\C
ommon\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit
status 2
----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\
\users\\andrei~1.gug\\appdata\\local\\temp\\pip-build-mbaaft\\pyminizip\\setup.p
y';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n
');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\an
drei~1.gug\appdata\local\temp\pip-9hqnfh-record\install-record.txt --single-vers
ion-externally-managed --compile" failed with error code 1 in c:\users\andrei~1.
gug\appdata\local\temp\pip-build-mbaaft\pyminizip\
I also tried to install the zlib.dll -> copied from the internet to the C:\Windows\SysWOW64 --> same result
Can someone please help me with this toppic?

First get a copy of pyminizip from pypi and zlib source (http://zlib.net/zlib1211.zip)
A few things you need to do after that:
compile the zlibvc solution file using Visual Studio (Here's how: http://www.tannerhelland.com/5076/compile-zlib-winapi-wapi-stdcall/) - make sure you compile for the right platform (x86/x64!!)
copy the created 'zlibstat.lib' from ZLibStatRelease subfolder into the python package install folder (next to setup.py) and rename it to 'zlib.lib'
copy all the zlib source files (except makefile) from the zlib folder into the python package src subfolder, including the win32 subfolder
Now you should be good to go installing using 'python setup.py install'

Related

Can't install zbar on windows

I know there is already a question about this but it didn't work for me.
When I do
pip install zbar
it returns this
Collecting zbar
Using cached https://files.pythonhosted.org/packages/33/54/cc5819efc9ee7e34b60b41e1d2d4753b6dd0c26a41c9a552611f66aa106e/zbar-0.10.tar.bz2
Building wheels for collected packages: zbar
Building wheel for zbar (setup.py) ... error
Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\johnsonl\\appdata\\local\\temp\\pip-install-sbojn0\\zbar\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d c:\users\johnsonl\appdata\local\temp\pip-wheel-omdejw --python-tag cp27:
running bdist_wheel
running build
running build_ext
building 'zbar' extension
creating build
creating build\temp.win32-2.7
creating build\temp.win32-2.7\Release
C:\Users\JohnsonL\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\python27\include -Ic:\python27\PC /Tczbarmodule.c /Fobuild\temp.win32-2.7\Release\zbarmodule.obj
zbarmodule.c
c:\users\johnsonl\appdata\local\temp\pip-install-sbojn0\zbar\zbarmodule.h(26) : fatal error C1083: Cannot open include file: 'zbar.h': No such file or directory
error: command 'C:\\Users\\JohnsonL\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status 2
----------------------------------------
Failed building wheel for zbar
Running setup.py clean for zbar
Failed to build zbar
Installing collected packages: zbar
Running setup.py install for zbar ... error
Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\johnsonl\\appdata\\local\\temp\\pip-install-sbojn0\\zbar\\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\johnsonl\appdata\local\temp\pip-record-fjbzdu\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
building 'zbar' extension
creating build
creating build\temp.win32-2.7
creating build\temp.win32-2.7\Release
C:\Users\JohnsonL\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\python27\include -Ic:\python27\PC /Tczbarmodule.c /Fobuild\temp.win32-2.7\Release\zbarmodule.obj
zbarmodule.c
c:\users\johnsonl\appdata\local\temp\pip-install-sbojn0\zbar\zbarmodule.h(26) : fatal error C1083: Cannot open include file: 'zbar.h': No such file or directory
error: command 'C:\\Users\\JohnsonL\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status 2
----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\johnsonl\\appdata\\local\\temp\\pip-install-sbojn0\\zbar\\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\johnsonl\appdata\local\temp\pip-record-fjbzdu\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\johnsonl\appdata\local\temp\pip-install-sbojn0\zbar\
I tried installing the wheel like the question suggested and it worked for me before. But now it just returns this
zbar-0.10-cp27-none-win_amd64 (1).whl is not a supported wheel on this platform.
It also says to give the return of python --version so this is mine
Python 2.7.15

pip install pcapy cannot open include file 'pcap.h'

I tried to install pcapy using pip install pcapy, but I encoutered an error stating that the file pcap.h does not exist as following:
Installing collected packages: pcapy
Running setup.py install for pcapy ... error
Complete output from command c:\python27\python.exe -u -c "import setuptools
tokenize;__file__='c:\\users\\username\\appdata\\local\\temp\\pip-install-1tyk
yr\\pcapy\\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\username\appdata\local\temp\pip-record-u_q6qm\install-record.txt
--single-version-externally-managed --compile:
running install
running build
running build_ext
building 'pcapy' 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\win32
C:\Users\UserName\AppData\Local\Programs\Common\Microsoft\Visual C++ for
Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWIN32=1 -I
c:\wpdpack\Include -Ic:\python27\include -Ic:\python27\PC /Tppcapdumper.cc /Fobuild\temp.win-amd64-2.7\Release\pcapdumper.obj
pcapdumper.cc
pcapdumper.cc(11) : fatal error C1083: Cannot open include file: 'pcap.h': N
o such file or directory
error: command 'C:\\Users\\UserName\\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\\username\\appdata\\local\\temp\\pip-install-1tykyr\\pcapy\\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\username\appdata\local\temp\pip-record-u_q6qm\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\username\appdata\local\temp\pip-install-1tykyr\pcapy\
I tried to upgrade setuptools but I got the same result. I tried to install libcap by running pip install libcap but I also got the same problem. How can I fix this problem?
Let's take a look first to this specific line cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DWIN32=1 -Ic:\wpdpack\Include -Ic:\python27\include -Ic:\python27\PC /Tppcapdumper.cc /Fobuild\temp.win-amd64-2.7\Release\pcapdumper.obj
As you can see there, when pip installing, setup.py will try to use winpcap as a dependency to compile pcapdumper.cc and the location is expected to be c:\wpdpack.
To make it work you just need to download and extract the latest stable winpcap library version (ie: not beta suffix) and uncompress it on c:. Then you just open a visual command prompt and try again pip install pcapy.
On my case I've tried using vs2015+python3.6.x and it's been built smoothly. In any case, make sure you read its docs carefully, specially the part where it talks about requirements.
Also, one last hint, I recommend you take a look to this answer which explains very briefly how to proceed each time you want to install tricky libraries like this pcapy.
It's generally easier to download install a binary. If you do build from source:
Download the WinPcap Developer's Pack.
Use pip's --global-option. setup.py is different, but I think pip is preferred over setup.py anyway.
Here's an example line (substitute in the correct paths for your system; I just referenced them right in the Downloads folder):
pip install ./pcapy-src-dir --global-option=build_ext --global-option="-LC:\path\to\WpdPack_4_1_2\WpdPack\Lib" --global-option="-IC:\path\to\WpdPack_4_1_2\WpdPack\Include
See also this answer

Installing PySCIPOpt on Python 2.7 (Windows 10) via pip doesn't work

I just tried installing PySCIPOpt with pip by doing "pip install pyscipopt", however I get the following error message:
What am I doing wrong?
I'm running Python 2.7 on a 64-bit Windows 10 machine. It wouldn't let me post the question like this, so I deleted some obvious parts from the error message below.
Collecting pyscipopt
Using cached PySCIPOpt-1.2.0.tar.gz
Building wheels for collected packages: pyscipopt
Running setup.py bdist_wheel for pyscipopt ... error
Complete output from command C:\Python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\daniel\\appdata\\local\\temp\\pip-build-kejfxp\\pyscipopt\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d c:\users\daniel\appdata\local\temp\tmpaj_ydopip-wheel- --python-tag cp27:
scipoptir:
includedir: c:\users\daniel\appdata\local\temp\pip-build-kejfxp\pyscipopt\include
libdir: c:\users\daniel\appdata\local\temp\pip-build-kejfxp\pyscipopt\lib
running bdist_wheel
creating build\temp.win32-2.7\Release\src\pyscipopt
C:\Program Files (x86)\Common Files\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\users\daniel\appdata\local\temp\pip-build-kejfxp\pyscipopt\include -IC:\Python27\include -IC:\Python27\PC /Tcsrc\pyscipopt\scip.c /Fobuild\temp.win32-2.7\Release\src\pyscipopt\scip.obj
scip.c
src\pyscipopt\scip.c(507) : fatal error C1083: Cannot open include file: 'scip/scip.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Common Files\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status 2
----------------------------------------
Failed building wheel for pyscipopt
Running setup.py clean for pyscipopt
Failed to build pyscipopt
Installing collected packages: pyscipopt
Running setup.py install for pyscipopt ... error
Complete output from command C:\Python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\daniel\\appdata\\local\\temp\\pip-build-kejfxp\\pyscipopt\\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\daniel\appdata\local\temp\pip-zqfl67-record\install-record.txt --single-version-externally-managed --compile:
scipoptir:
includedir: c:\users\daniel\appdata\local\temp\pip-build-kejfxp\pyscipopt\include
libdir: c:\users\daniel\appdata\local\temp\pip-build-kejfxp\pyscipopt\lib
running install
creating build\temp.win32-2.7\Release\src\pyscipopt
C:\Program Files (x86)\Common Files\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\users\daniel\appdata\local\temp\pip-build-kejfxp\pyscipopt\include -IC:\Python27\include -IC:\Python27\PC /Tcsrc\pyscipopt\scip.c /Fobuild\temp.win32-2.7\Release\src\pyscipopt\scip.obj
scip.c
src\pyscipopt\scip.c(507) : fatal error C1083: Cannot open include file: 'scip/scip.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Common Files\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status 2
----------------------------------------
Command "C:\Python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\daniel\\appdata\\local\\temp\\pip-build-kejfxp\\pyscipopt\\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\daniel\appdata\local\temp\pip-zqfl67-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\daniel\appdata\local\temp\pip-build-kejfxp\pyscipopt\
It still doesn't let me post the question, so here's some more text, maybe now it will work. It still doesn't. Maybe now?
This question is already answered here: https://github.com/SCIP-Interfaces/PySCIPOpt/issues/102
What was missing - apart from installing the SCIP Opt Suite - was to set the path to where the SCIP Opt Suite was installed:
set SCIPOPTDIR="C:\Program Files\SCIPOptSuite"
or something similar.
Installation instructions says:
SCIPOPTDIR needs to have a subdirectory lib that contains the library.
Additionally, if you're building PySCIPOpt from source, i.e. not using the precompiled egg or wheel, you also need to place all SCIP header files into a directory include next to lib (this is done automatically by make install INSTALLDIR=$SCIPOPTDIR SHARED=true of the SCIP Optimization Suite)
So first you need to install SCIP Optimization Suite.

Installing gmpy with an Anaconda distribution of Python 2 (Windows)

I am trying to use a program called CatMAP that makes heavy use of the gmpy dependency (I think it's gmpy, not gmpy2 based on the installation instructions).
I have Python 2.7.12 via Anaconda but am having a lot of trouble installing gmpy. Doing pip install gmpy doesn't work, and all the versions I've found on Anaconda Cloud are for Linux. Any suggestions?
The error message from the pip install method is shown below:
Collecting gmpy
Using cached gmpy-1.17.zip
Building wheels for collected packages: gmpy
Running setup.py bdist_wheel for gmpy ... error
Complete output from command C:\Users\andre\Anaconda3\envs\python2\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\andre\\appdata\\local\\temp\\pip-build-wu9jm7\\gmpy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d c:\users\andre\appdata\local\temp\tmphhh_2jpip-wheel- --python-tag cp27:
running bdist_wheel
running build
running build_ext
building 'gmpy' 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\src
C:\Users\andre\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Users\andre\Anaconda3\envs\python2\include -IC:\Users\andre\Anaconda3\envs\python2\PC /Tcsrc/gmpy.c /Fobuild\temp.win-amd64-2.7\Release\src/gmpy.obj
gmpy.c
c:\users\andre\appdata\local\temp\pip-build-wu9jm7\gmpy\src\gmpy.h(30) : fatal error C1083: Cannot open include file: 'gmp.h': No such file or directory
error: command 'C:\\Users\\andre\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2
----------------------------------------
Failed building wheel for gmpy
Running setup.py clean for gmpy
Failed to build gmpy
Installing collected packages: gmpy
Running setup.py install for gmpy ... error
Complete output from command C:\Users\andre\Anaconda3\envs\python2\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\andre\\appdata\\local\\temp\\pip-build-wu9jm7\\gmpy\\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\andre\appdata\local\temp\pip-uvzbnt-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
building 'gmpy' 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\src
C:\Users\andre\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Users\andre\Anaconda3\envs\python2\include -IC:\Users\andre\Anaconda3\envs\python2\PC /Tcsrc/gmpy.c /Fobuild\temp.win-amd64-2.7\Release\src/gmpy.obj
gmpy.c
c:\users\andre\appdata\local\temp\pip-build-wu9jm7\gmpy\src\gmpy.h(30) : fatal error C1083: Cannot open include file: 'gmp.h': No such file or directory
error: command 'C:\\Users\\andre\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2
----------------------------------------
Command "C:\Users\andre\Anaconda3\envs\python2\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\andre\\appdata\\local\\temp\\pip-build-wu9jm7\\gmpy\\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\andre\appdata\local\temp\pip-uvzbnt-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\andre\appdata\local\temp\pip-build-wu9jm7\gmpy\
Since CatMAP uses mpmath there is a good chance gmpy is only needed to improve the performance of mpmath. Assuming that is true, gmpy2 will work since mpmath supports either gmpy or gmpy2.
You can find pip compatible wheels for gmpy and gmpy2 here

error when python pip install rrdtool on windows 7

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\
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.
When facing the error message
Error: Unable to compile the binary module
you'll need to ensure rrdtool is installed. It seems it's impossible to install the rrdtool-python module without the underlying libs/binaries/headers already existing on your filesystem.
In general, installing the following packages on your machine should resolve this issue:
rrdtool
rrdtool-devel
for my specific use-case in RHEL8, installing the following allowed rrdtool-python to install smoothly:
rrdtool-1.7.0-16.el8.x86_64.rpm
rrdtool-devel-1.7.0-16.el8.x86_64.rpm

Categories