zlib and zipfile module in Python2.4

Fredrik Lundh fredrik at pythonware.com
Tue Apr 12 05:51:02 EDT 2005


Bill Anderson wrote:

> I recently had this issue and discovered that if zlib headers are not
> there, python still builds gzip ... which imports zlib. Seems to me that
> since zlib apparently depends on gzip, gzip should only be built if zlib
> is.

gzip is a Python module, and isn't "built".

if zlib isn't available, importing gzip gives you an ImportError exception.  if you
remove gzip, you still get an ImportError exception.  the only difference is that
the former message tells you exactly what module you need to add.

attempting to remove Python modules that may or may not work depending
on what other modules are available or not when you run the Python installation
scripts, in order to make the error message less informative, strikes me as some-
what silly.

</F> 






More information about the Python-list mailing list