Python-2.1.1 and wxPython problem loading zlib

Andrew MacIntyre andymac at bullseye.apana.org.au
Tue Aug 28 12:57:35 CEST 2001


On 27 Aug 2001, Doug Farrell wrote:

{...}

> However, when I try to run the main demo.py program I get
> the following messages:
>
> # python demo.py
> Traceback (most recent call last):
>   File "demo.py", line 3, in ?
>     import Main
>   File "Main.py", line 19, in ?
>     import images
>   File "images.py", line 5, in ?
>     import cPickle, zlib
> ImportError: No module named zlib
>
> I just used pkg-get install zlib    to install zlib from
> www.sunfreeware.com, 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 setup.py script in your Python build
directory:

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

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

--
Andrew I MacIntyre                     "These thoughts are mine alone..."
E-mail: andymac at bullseye.apana.org.au  | Snail: PO Box 370
        andymac at pcug.org.au            |        Belconnen  ACT  2616
Web:    http://www.andymac.org/        |        Australia





More information about the Python-list mailing list