With my Anaconda python27 install on Windows 64 bit, pip doesn't work anymore..
First of all, I tried to upgrade it, but it was up to date :
C:\Users\Administrateur>python -m pip install --upgrade pip
Requirement already up-to-date: pip in c:\program files\anaconda\lib\site-packages
I also tried to upgrade setuptools, it wasn't updated but it doesn't helped.
I recently tried to install few modules and it end each time with an error. For example, If I want to install pyx I get the following error message :
No files/directories in
c:\users\...\appdata\local\temp\pip-build-soh1bb\pyx\pip-egg-info (from PKG-INFO)
If I open a windows in my temp folder, I see that the files are collected then deleted just after. Also, this is not the same folder that the one cited in error.
If I try to install fiona, the error is different :
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Bin\cl.exe /c /nologo
/Ox /MD /W3 /GS- /DNDEBUG "-IC:\Program Files\Anaconda\include" "-IC:\Program
Files\Anaconda\PC" /Tpfiona/_transform.cpp /Fobuild\temp.win-amd64-
2.7\Release\fiona/_transform.obj
_transform.cpp
fiona/_transform.cpp(564) :
fatal error C1083: Impossible d'ouvrir le fichier includeÿ: 'cpl_conv.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
Failed building wheel for fiona
Failed to build fiona
And finally :
Command ""C:\Program Files\Anaconda\python.exe" -u -c "import setuptools, tokenize;__file__='c:\\users\\...\\appdata\\local\\temp\\pip-build-h2ns8z\\f iona\\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\...\appdata\local\temp\pip-fme6kj-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in
c:\users\...\appdata\local\temp\pip-build-h2ns8z\fiona\
I never had this problem before and pip is updated correctly, last module I installed is pygame could it be related ?
Looks like you install is missing libgdal package. Install it first.
Download Gdal Binaries
Related
I need to install pysqlcipher on my windows computer but when I do:
pip install pysqlcipher
I have:
Collecting pysqlcipher3
Using cached https://files.pythonhosted.org/packages/a4/06/1d56bdec3129eff6dd54323d249784ccd90ce03c8cae7870d45e434bae77/pysqlcipher3-1.0.3.tar.gz
Building wheels for collected packages: pysqlcipher3
Building wheel for pysqlcipher3 (setup.py) ... done
WARNING: Legacy build of wheel for 'pysqlcipher3' created no files.
Command arguments: 'C:\Users\Elouan\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Elouan\\AppData\\Local\\Temp\\pip-install-827zddbs\\pysqlcipher3\\setup.py'"'"'; __file__='"'"'C:\\Users\\Elouan\\AppData\\Local\\Temp\\pip-install-827zddbs\\pysqlcipher3\\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\Elouan\AppData\Local\Temp\pip-wheel-jkj29o6_' --python-tag cp38
Command output: [use --verbose to show]
Running setup.py clean for pysqlcipher3
Failed to build pysqlcipher3
Installing collected packages: pysqlcipher3
Running setup.py install for pysqlcipher3 ... done
Successfully installed pysqlcipher3
WARNING: You are using pip version 19.2.3, however version 20.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
I have tried to install it with git and I have:
python setup.py build
running build
running build_py
running build_ext
Builds a C extension linking against libsqlcipher library
building 'pysqlcipher3._sqlite3' extension
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DMODULE_NAME=\"pysqlcipher3.dbapi2\" -IC:\Users\Elouan\AppData\Local\Programs\Python\Python37\include -IC:\Users\Elouan\AppData\Local\Programs\Python\Python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include" "-IF:\Windows Kits\10\include\10.0.18362.0\ucrt" "-IF:\Windows Kits\10\include\10.0.18362.0\shared" "-IF:\Windows Kits\10\include\10.0.18362.0\um" "-IF:\Windows Kits\10\include\10.0.18362.0\winrt" "-IF:\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tcsrc\python3\module.c /Fobuild\temp.win-amd64-3.7\Release\src\python3\module.obj
module.c
C:\Users\Elouan\pysqlcipher3\src\python3\connection.h(33): fatal error C1083: Impossible d'ouvrir le fichier include : 'sqlcipher/sqlite3.h' : No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.25.28610\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
I tried that with python3 but it's the same.
I think it's like this problem:
Issue in installing pysqlcipher3
but I did not succeed to resolve the problem
Someone can help me please?
Install tlc (i'm use 8.6)
https://www.activestate.com/products/tcl/downloads/
(tclsh*.exe) is available in the PATH.(tclsh C:\Tcl\bin\tclsh.exe)
Install VISUAL STUDIO (add) and VISUAL STUDIO C++ Build
go to microsoft
Install OpenSSL x64 or x32 (i'm use x64)
https://slproweb.com/products/Win32OpenSSL.html
add to PATH
x64
OPENSSL_CONF C:\Program Files\OpenSSL-Win64\bin\openssl.cfg
x32
OPENSSL_CONF C:\Program Files(x86)\OpenSSL-Win32\bin\openssl.cfg
in folder
C:\Program Files\OpenSSL-Win64\lib
save copy
libcrypto.def and libcrypto.lib
and rename at
libeay32.def and libeay32.lib
save copy
libssl.def and libssl.lib
and rename at
ssleay32.def and ssleay32.lib
copy folder
C:\Program Files\OpenSSL-Win64\include\openssl
to
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include
Download sqlcipher
https://github.com/sqlcipher/sqlcipher
in root sqlcipher change Makefile.msc
this
TCC = $(TCC) -DSQLITE_TEMP_STORE=1
change to
TCC = $(TCC) -DSQLITE_TEMP_STORE=2 -DSQLITE_HAS_CODEC -I"C:\Program Files\OpenSSL-Win64\include"
next
# If ICU support is enabled, add the linker options for it.
#
!IF $(USE_ICU)!=0
LTLIBPATHS = $(LTLIBPATHS) /LIBPATH:$(ICULIBDIR)
LTLIBS = $(LTLIBS) $(LIBICU)
!ENDIF
# <</mark>>
# You should not have to change anything below this line
change to
# If ICU support is enabled, add the linker options for it.
#
!IF $(USE_ICU)!=0
LTLIBPATHS = $(LTLIBPATHS) /LIBPATH:$(ICULIBDIR)
LTLIBS = $(LTLIBS) $(LIBICU)
!ENDIF
# <</mark>>
LTLIBPATHS = $(LTLIBPATHS) /LIBPATH:"C:\Program Files\OpenSSL-Win64\lib\VC\static"
LTLIBS = $(LTLIBS) libcrypto64MT.lib libssl64MT.lib ws2_32.lib shell32.lib advapi32.lib gdi32.lib user32.lib crypt32.lib
# You should not have to change anything below this line
x64 Native Tools Command (VS)
path\to\sqlcipher>
nmake /f Makefile.msc clean
nmake /f Makefile.msc
Download pysqlcipher3
https://github.com/rigglemania/pysqlcipher3
create folder
/amalgamation in /pysqlcipher3
COPY TWO FILES FROM /sqlcipher
sqlite3.c sqlite3.h
TO /pysqlcipher3/amalgamation
Download sqlite-amalgamation
https://sqlite.org/download.html
i'm use https://sqlite.org/2021/sqlite-amalgamation-3340100.zip
create folder
/pysqlcipher3/src/python3/sqlcipher
copy 4 files from sqlite-amalgamation-3340100.zip
shell.c sqlite3.c sqlite.h sqliteext.h
to
/pysqlcipher3/src/python3/sqlcipher
x64 Native Tools Command (VS)
path\to\pysqlcipher3>
setup.py clean
enter code here
setup.py build_amalgamation
setup.py install
I have been trying to install pycairo for three days and I was wondering wether anyone could reproduce the error or if I am slowly starting to turn mad. I am glad for any help or suggestions.
What I have tried:
I looked at the answers from Installation of PyCairo on Windows and How do you install PyCairo (Cairo for Python) on Windows?.
I tried installing pycairo using a file downloaded from Python Extension Packages for Windows but it says
ERROR: pycairo-1.19.1-cp38-cp38-win32.whl is not a supported wheel on this platform.
I used the following command pip install "C:\Users\...\Downloads\pycairo-1.19.1-cp38-cp38-win32.whl"
I tried installing pycairo via pip pip install pycairo which gives me a really long error message:
Collecting pycairo
Using cached pycairo-1.19.1.tar.gz (205 kB)
Installing collected packages: pycairo
Running setup.py install for pycairo ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\caspa\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\caspa\\AppData\\Local\\Temp\\pip-install-tjiuwot4\\pycairo\\setup.py'"'"'; __file__='"'"'C:\\Users\\caspa\\AppData\\Local\\Temp\\pip-install-tjiuwot4\\pycairo\\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\caspa\AppData\Local\Temp\pip-record-pbvjvlu1\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\caspa\appdata\local\programs\python\python37-32\Include\pycairo'
cwd: C:\Users\caspa\AppData\Local\Temp\pip-install-tjiuwot4\pycairo\
Complete output (18 lines):
running install
running build
running build_py
creating build
creating build\lib.win32-3.7
creating build\lib.win32-3.7\cairo
copying cairo\__init__.py -> build\lib.win32-3.7\cairo
copying cairo\__init__.pyi -> build\lib.win32-3.7\cairo
copying cairo\py.typed -> build\lib.win32-3.7\cairo
running build_ext
building 'cairo._cairo' extension
creating build\temp.win32-3.7
creating build\temp.win32-3.7\Release
creating build\temp.win32-3.7\Release\cairo
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=19 -DPYCAIRO_VERSION_MICRO=1 -Ic:\users\caspa\appdata\local\programs\python\python37-32\include -Ic:\users\caspa\appdata\local\programs\python\python37-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.7.2\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tccairo/device.c /Fobuild\temp.win32-3.7\Release\cairo/device.obj
device.c
C:\Users\caspa\AppData\Local\Temp\pip-install-tjiuwot4\pycairo\cairo\pycairo.h(37): fatal error C1083: Datei (Include) kann nicht ge”ffnet werden: "cairo.h": No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.24.28314\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\caspa\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\caspa\\AppData\\Local\\Temp\\pip-install-tjiuwot4\\pycairo\\setup.py'"'"'; __file__='"'"'C:\\Users\\caspa\\AppData\\Local\\Temp\\pip-install-tjiuwot4\\pycairo\\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\caspa\AppData\Local\Temp\pip-record-pbvjvlu1\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\caspa\appdata\local\programs\python\python37-32\Include\pycairo' Check the logs for full command output.
I get the same error message when trying to install PyGoject which contains pycairo via pip.
I found something that should be supposed to fix the error, but unfortunatly the Link in the forum is dead. I went to the official download page (I belive) cairographics.org and its a dead link as well.
EDIT: I forgot to mention another thing I tried, I went to the Cairo Docs on getting started, but it's unfortunatly only for Ubuntu/Linux/IOS.
I've ran into a similar error to this as well, so here's what worked for me. Go to https://pycairo.readthedocs.io/en/latest/getting_started.html for more info. You'll have to run one of these five commands to set up pkg-config on your computer prior to running the install command.
Ubuntu/Debian: sudo apt install libcairo2-dev pkg-config python3-dev
macOS/Homebrew: brew install cairo pkg-config
Arch Linux: sudo pacman -S cairo pkgconf
Fedora: sudo dnf install cairo-devel pkg-config python3-devel
penSUSE: sudo zypper install cairo-devel pkg-config python3-devel
Then run:
import cairo
Hope that works!
I'm new with Python so I'm not really sure what's going on but this works for me.
Simply change the "pip" to "pip3" and it'll magically work.
As of this writing, I'm using Python 3.8 64-bit so my command is this:
pip3 install pycairo-1.19.1-cp38-cp38-win_amd64.whl
From what I understand, this seems to be an incompatibility since Python 2 life has ended and lost support just early this year. So pretty much all the tutorial is outdated and didn't work.
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
i am trying to install mysql client to connect mysql with python 2.7 for django project but getting error, even i tried MySQL-python connector to install but getting error there also.
C:\Users\syedabdul\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Dve
rsion_info=(1,3,12,'final',0) -D__version__=1.3.12 "-IC:\Program Files (x86)\MySQL\MySQL Connector C 6.1\include" -Ic:\python27\include -Ic:\pyt
hon27\PC /Tc_mysql.c /Fobuild\temp.win32-2.7\Release\_mysql.obj /Zl
_mysql.c
_mysql.c(29) : fatal error C1083: Cannot open include file: 'mysql.h': No such file or directory
error: command 'C:\\Users\\syedabdul\\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\\syedab~1\\appdata\\local\\temp\\pip-build-xgy30p\\mysqlc
lient\\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\syedab~1\appdata\local\temp\pip-rs9dvc-record\install-record.txt --single-version-externally-managed --compile" fail
ed with error code 1 in c:\users\syedab~1\appdata\local\temp\pip-build-xgy30p\mysqlclient\
I would suggest you use the appropriate official python wheel for your system from pypi.python.org then install it by pip install MySQLConnector2.7.whl assuming MySQLConnector2.7.whl is the file name
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'