problem with gzip files

Quinn Dunkan quinn at yak.ugcs.caltech.edu
Thu Jul 19 14:59:46 EDT 2001


On Fri, 20 Jul 2001 03:19:42 +1000, Dave Harrison <dlharris at mail.usyd.edu.au>
wrote:
>Traceback (most recent call last):
>	File "./zipreader.py", line 3, in ?
>		import gzip, os
>	File "/usr/local/lib/python2.1/gzip.py", line 9, in ?
>		import zlib
>ImportError: No module named zlib
>
>I then tried installed the zlib library, which went fine.  Except it hasn't
>solved my problem.
>
>Is there something simple I am missing here ? Any advice ?

You probably installed the C zlib library (called libz, confusingly).  You
still don't have the python zlib module.

If you're using 2.0 or newer, you should be able to recompile and setup.py
will pick it up automatically and make you a zlib module.  Otherwise, edit
Modules/Setup.



More information about the Python-list mailing list