cannot compile/install on windows
Closed this issue · 10 comments
Thank you so much for this wrapper. I've been able to use pip to install on ubuntu, but I haven't been able to get it to install on windows due to multiple compiler errors.
I've tried to install the zlib library on windows (gnuwin32), but I'm not sure pyminizip/setup.py knows how to find the source files it needs from that library.
Here is one error log from Pycharm package installer:
Here's the error log:
Install packages failed: Error occurred when installing package pyminizip.
The following command was executed:
packaging_tool.py install --build-dir C:\Users\Pylee\AppData\Local\Temp\pycharm-packaging2473906546786097704.tmp pyminizip
The error output of the command:
Downloading/unpacking pyminizip
Running setup.py egg_info for package pyminizip
Installing collected packages: pyminizip
Running setup.py install for pyminizip
building 'pyminizip' extension
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Isrc "-ID:\Program Files (x86)\Python27\include" "-ID:\Program Files (x86)\Python27\PC" /Tcsrc/py_minizip.c /Fobuild\temp.win32-2.7\Release\src/py_minizip.obj
py_minizip.c
c:\users\pylee\appdata\local\temp\pycharm-packaging2473906546786097704.tmp\pyminizip\src\zip.h(43) : fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory
error: command '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"' failed with exit status 2
Complete output from command "D:\Program Files (x86)\Python27\python.exe" -c "import setuptools;file='C:\Users\Pylee\AppData\Local\Temp\pycharm-packaging2473906546786097704.tmp\pyminizip\setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" install --single-version-externally-managed --record c:\users\pylee\appdata\local\temp\pip-d5vjjc-record\install-record.txt:
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:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Isrc "-ID:\Program Files (x86)\Python27\include" "-ID:\Program Files (x86)\Python27\PC" /Tcsrc/py_minizip.c /Fobuild\temp.win32-2.7\Release\src/py_minizip.obj
py_minizip.c
c:\users\pylee\appdata\local\temp\pycharm-packaging2473906546786097704.tmp\pyminizip\src\zip.h(43) : fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory
error: command '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"' failed with exit status 2
Command "D:\Program Files (x86)\Python27\python.exe" -c "import setuptools;file='C:\Users\Pylee\AppData\Local\Temp\pycharm-packaging2473906546786097704.tmp\pyminizip\setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" install --single-version-externally-managed --record c:\users\pylee\appdata\local\temp\pip-d5vjjc-record\install-record.txt failed with error code 1 in C:\Users\Pylee\AppData\Local\Temp\pycharm-packaging2473906546786097704.tmp\pyminizip
Storing complete log in C:\Users\Pylee\AppData\Roaming\pip\pip.log
I'm sorry, I don't have a PC in which WINDOWS installed. So I'm not sure how to solve the problem.
But would you run setup.py directory?
Like this
python setup.py build_ext --include-dirs=/opt/local/Library/Frameworks/Python.framework/Versions/3.3/include/python3.3m/
Thanks, Shin.
What does the path
"/opt/local/Library/Frameworks/Python.framework/Versions/3.3/include/python3.3m/"
mean on a windows machine? Windows doesn't have an "/opt/local" directory.
On windows, the python framework would be under "C:\Program
Files\Python27\include" or C:\Program Files(x86)\Python27\include"
My guess is that I need to install zlib properly on windows so that zlib.h
is found. Does that mean I need to install the zlib source, not just
zlib.dll? I'm not sure how zlib can be installed on windows so that it is
included in the python library.
Here's the output when I run the command you gave me (I'm using Python
version 2.7):
C:\Users\Pyle.PyleE-1007\Documents\Visual Studio
2010\Projects\pyminizip>python setup.py build_ext
--include-dirs=/opt/local/Library/Frameworks/Python.framework/Versions/3.3/include/python3.3m/
running build_ext
building 'pyminizip' extension
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe /c
/nologo /Ox /MD /W3 /GS- /DNDEBUG -Isrc
-I/opt/local/Library/Frameworks/Python.framework/Versions/3.3/include/python3.3m/
"-IC:\Program Files\Python27\include" "-IC:\Program Files\Python27\PC
" /Tcsrc/py_minizip.c /Fobuild\temp.win-amd64-2.7\Release\src/py_minizip.obj
py_minizip.c
c:\users\pyle.pylee-1007\documents\visual studio
2010\projects\pyminizip\src\zip.h(43) : fatal error C1083: Cannot open
include file: 'zlib.h': No such file or directory
error: command '"c:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\BIN\amd64\cl.exe"' failed with exit status 2
On Sun, Apr 13, 2014 at 10:45 AM, Shin Aoyama notifications@github.comwrote:
I'm sorry, I don't have a PC in which WINDOWS installed. I'm not sure how
to solve the problem.
But would you run setup.py directory?
Like thispython setup.py build_ext --include-dirs=/opt/local/Library/Frameworks/Python.framework/Versions/3.3/include/python3.3m/
Reply to this email directly or view it on GitHubhttps://github.com//issues/3#issuecomment-40310715
.
Eric Pyle
Dallas, TX
SIL - Language Software Developer
Skype: eric.d.pyle
What does the path?
Oh sorry there was too few information. The path was only example. I wanted you to set there the path to the 'zlib.h' on your WINDOWS.
My guess is that I need to install zlib properly on windows so that zlib.h is found
I think so.
zlib is here -> http://gnuwin32.sourceforge.net/packages/zlib.htm
I've included the zlib.h in my include-dirs path. And also copied unistd.h
and getopt.h to my python27/include directory.
So now, I'm am stuck on a linker error on z.lib. Any thoughts?
C:\Users\Pylee\Documents\Visual Studio 2010\Projects\pyminizip>python
setup.py build_ext --include-dirs="D:\Program Files
(x86)\GnuWin32\src\zlib\1.2.3\zlib-1.2.3"
running build_ext
building 'pyminizip' extension
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo
/Ox /MD /W3 /GS- /DNDEBUG -Isrc "-ID:\Program Files
(x86)\GnuWin32\src\zlib\1.2.3\zlib-1.2.3" "-ID:\Program Files
(x86)\Python27\include" "-ID:\Program Files (x86
)\Python27\PC" /Tcsrc/py_minizip.c
/Fobuild\temp.win32-2.7\Release\src/py_minizip.obj
py_minizip.c
Importing getopt library
src/py_minizip.c(422) : warning C4090: 'function' : different 'const'
qualifiers
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo
/Ox /MD /W3 /GS- /DNDEBUG -Isrc "-ID:\Program Files
(x86)\GnuWin32\src\zlib\1.2.3\zlib-1.2.3" "-ID:\Program Files
(x86)\Python27\include" "-ID:\Program Files (x86
)\Python27\PC" /Tcsrc/zip.c /Fobuild\temp.win32-2.7\Release\src/zip.obj
zip.c
Importing getopt library
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo
/Ox /MD /W3 /GS- /DNDEBUG -Isrc "-ID:\Program Files
(x86)\GnuWin32\src\zlib\1.2.3\zlib-1.2.3" "-ID:\Program Files
(x86)\Python27\include" "-ID:\Program Files (x86
)\Python27\PC" /Tcsrc/ioapi.c /Fobuild\temp.win32-2.7\Release\src/ioapi.obj
ioapi.c
Importing getopt library
src/ioapi.c(126) : warning C4996: 'strncpy': This function or variable may
be unsafe. Consider using strncpy_s instead. To disable deprecation, use
_CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\INCLUDE\string.h(157) : see declaration of 'strncpy'
src/ioapi.c(145) : warning C4996: 'fopen': This function or variable may be
unsafe. Consider using fopen_s instead. To disable deprecation, use
_CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\INCLUDE\stdio.h(237) : see declaration of 'fopen'
src/ioapi.c(166) : warning C4996: 'fopen': This function or variable may be
unsafe. Consider using fopen_s instead. To disable deprecation, use
_CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\INCLUDE\stdio.h(237) : see declaration of 'fopen'
src/ioapi.c(183) : warning C4996: 'strncpy': This function or variable may
be unsafe. Consider using strncpy_s instead. To disable deprecation, use
_CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\INCLUDE\string.h(157) : see declaration of 'strncpy'
src/ioapi.c(188) : warning C4996: '_snprintf': This function or variable
may be unsafe. Consider using _snprintf_s instead. To disable deprecation,
use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\INCLUDE\stdio.h(358) : see declaration of '_snprintf'
src/ioapi.c(208) : warning C4996: 'strncpy': This function or variable may
be unsafe. Consider using strncpy_s instead. To disable deprecation, use
_CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\INCLUDE\string.h(157) : see declaration of 'strncpy'
src/ioapi.c(213) : warning C4996: '_snprintf': This function or variable
may be unsafe. Consider using _snprintf_s instead. To disable deprecation,
use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\INCLUDE\stdio.h(358) : see declaration of '_snprintf'
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\link.exe /DLL
/nologo /INCREMENTAL:NO "/LIBPATH:D:\Program Files (x86)\Python27\libs"
"/LIBPATH:D:\Program Files (x86)\Python27\PCbuild" _z.lib
/_EXPORT:initpyminizip
build\temp.win3
2-2.7\Release\src/py_minizip.obj build\temp.win32-2.7\Release\src/zip.obj
build\temp.win32-2.7\Release\src/ioapi.obj
/OUT:build\lib.win32-2.7\pyminizip.pyd
/IMPLIB:build\temp.win32-2.7\Release\src\pyminizip.lib
/MANIFESTFILE:build\temp.wi
n32-2.7\Release\src\pyminizip.pyd.manifest
LINK : fatal error LNK1181: cannot open input file 'z.lib'
error: command '"C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\BIN\link.exe"' failed with exit status 1181
On Tue, Apr 15, 2014 at 11:30 AM, Shin Aoyama notifications@github.comwrote:
What does the path?
Oh sorry there was too few information. The path was only example. I
wanted you to set there the path to the 'zlib.h' on your WINDOWS.My guess is that I need to install zlib properly on windows so that zlib.h
is found
I think so.
zlib is here -> http://gnuwin32.sourceforge.net/packages/zlib.htm--
Reply to this email directly or view it on GitHubhttps://github.com//issues/3#issuecomment-40503277
.
Eric Pyle
Dallas, TX
SIL - Language Software Developer
Skype: eric.d.pyle
Someone got some news on this? I am having the same problem
i am also facing the same problem.. any help please...
Same here fails looking for zlib.h on windows.
C:\Users\someone\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC
In my case,
Here is the place which should be the libraries, and head files of zlib.
include folder for header files, lib folder for library files.
Microsoft Visual C++ Compiler for Python 2.7 :
http://www.microsoft.com/en-us/download/details.aspx?id=44266
zlib :
http://www.zlib.net/
why pip install pyminizip not work
me too