By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,345 Members | 1,783 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,345 IT Pros & Developers. It's quick & easy.

No module named zlib

P: 7
hi,

i have seen various post related to this topic but i couldnt resolve my issue yet.
Im using python version 2.5 on Linux environment

this is the error im getting if i try to import zlib

[root@qsrpdbdev01 zlib-1.2.3]# python -c 'import zlib'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named zlib

I downloaded zlib-1.2.3.tar.gz , tried
1) ./configure, make test, make
2) ./configure --shared, make test, make

make test is running food and it says tested "ok" but if i try import zlib from python im always getting no module named zlib. Every post i see so far is suggesting to use ./configure --shared and its not helping me. We have another server running on python 2.4 and zlib import is working there. it seems to be an issue with python 2.5, is there any alternate zlib download for python 2.5 ? if yes, please provide a link.

appreciate any help on this..

thanks,
raj
Aug 12 '09 #1
Share this Question
Share on Google+
2 Replies


bvdet
Expert Mod 2.5K+
P: 2,851
zlib is part of the Python 2.5 library. Could your Python distribution have zlib disabled?
Aug 13 '09 #2

P: 7
I'm really new to python and linux and for some reason i was given the responsibility to upgrade the python application. :( i was looking a few forums and found something related to un-commenting zlib code in setup file. I tried but it didnt help. could you elaborate of python distribution part ?

I read in an earlier thread that python needs to be compiled with zlib. does it mean i have to install python again ?

thanks,
Aug 13 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.