2

I'm trying to install Python 2.7.3 + setuptools on my Centos 5.8.

First i download sources, unzip then ./configure && make && make install.

sh setuptools-0.6c11-py2.7.egg

i get error

zipimport.ZipImportError: can't decompress data; zlib not available

and nothing helps.

whereis zlib
zlib: /usr/lib/zlib.so /usr/lib/zlib.h /usr/include/zlib.h /usr/share/man/man3/zlib.3.gz
0

1 Answer 1

3

If you do an "rpm -qa | grep zlib" what all do you get? It could be a matter of having to

yum install zlib zlib-devel zlib-static 

This will ensure you have all of the packages you need. If you have all of those, you may need to symlink where your current version of zlib and it's libraries are to where Python is looking for them. Or specify in the Python setup where your zlib files are.

Disclaimer: I haven't installed Python 2.7.3 specifically but that's normally the issue with those types of errors in my experience.

1
  • This solved my problem on CentOS 7 for Python 3.6.1. Jun 1, 2017 at 10:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .