Python-2.1.1 and wxPython problem loading zlib

Andrew MacIntyre andymac at
Tue Aug 28 12:57:35 CEST 2001

On 27 Aug 2001, Doug Farrell wrote:


> However, when I try to run the main program I get
> the following messages:
> # python
> Traceback (most recent call last):
>   File "", line 3, in ?
>     import Main
>   File "", line 19, in ?
>     import images
>   File "", line 5, in ?
>     import cPickle, zlib
> ImportError: No module named zlib
> I just used pkg-get install zlib    to install zlib from
>, but that didn't solve the problem. Can someone
> tell me what I need to do to get the zlib module to load? Actually,
> any help or guidance would be greatly appreciated.

You need to build zlibmodule, now that you've installed zlib.  You should
be able to do this by re-running the script in your Python build

cd {...}/Python-2.1.1
python build
python install

If you haven't deleted your build directory, this should just build, rather than all the dynamically loadable extensions.

Andrew I MacIntyre                     "These thoughts are mine alone..."
E-mail: andymac at  | Snail: PO Box 370
        andymac at            |        Belconnen  ACT  2616
Web:        |        Australia

More information about the Python-list mailing list