2017-03-01 1 views
0

Ich versuche, die Python pyminizip Modul auf meinem PC zu installieren, aber ich habe die Brache Fehler:Fehler beim Python pyminizip Modul installieren und zlib.dll

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\ 

Ich habe auch versucht die zlib.dll zu installieren -> kopiert aus dem Internet in das C: \ Windows \ SysWOW64 -> dasselbe Ergebnis

Kann mir bitte jemand mit diesem Toppic helfen?

+0

Mögliches Duplikat der bereits gestellten Frage. Überprüfen Sie hier [Bereits gestellte Frage] (http://stackoverflow.com/questions/35161398/cant-compile-libpng-1-6-on-windows-via-cmake-cannot-open-include-file-zlib-h) –

+0

Ich habe alle Kommentare in diesem Thema gelesen, aber keine auf meiner Seite: '( – Gugy

Antwort

0

zuerst eine Kopie von pyminizip von pypi erhalten und zlib Quelle (http://zlib.net/zlib1211.zip) Ein paar Dinge, die Sie danach tun müssen:

  1. kompilieren die zlibvc Lösung Datei mit Visual Studio (hier, wie: http://www.tannerhelland.com/5076/compile-zlib-winapi-wapi-stdcall/) - stellen Sie sicher, dass Sie für die richtige Plattform (x86/x64 kompilieren !!)
  2. das erstellte ‚zlibstat.lib‘ von ZLibStatRelease Unterordner in das python-Paket installieren Ordner kopieren (neben setup.py) und benennen Sie sie in "zlib.lib

  3. kopieren Sie alle zlib-Quelldateien (außer makefile) von den zlib-Ordnern in das Python-Paket src Unterordner, einschließlich dem win32 Unterordner

Jetzt sollten Sie gut gehen Installation mit‘ python setup.py install '