Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
  • I have a machine running Scientific Linux 6
  • It comes with Python 2.6 by default
  • I've also installed Python 2.7.3 because I need to run some modules which only work with newest versions. This is working nicely.
  • I need to install more libraries for Python 2.7.3
  • I'm trying to install setuptools in order to grab these modules

[root@sa09b tmp]# wget

[root@sa09b tmp]# python2.7 Downloading

Traceback (most recent call last): File "", line 278, in

main(sys.argv[1:]) File "", line 212, in main

from setuptools.command.easy_install import main

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

oh? I thought I had that installed.

[root@sa09b tmp]# yum install zlib Loaded plugins: fastestmirror, refresh-packagekit, security

Loading mirror speeds from cached hostfile

  • sl:

  • sl-security:

Setting up Install Process

Package zlib-1.2.3-27.el6.x86_64 already installed and latest version

Nothing to do

  • So I looked up various forums
  • Most tell me to install zlib-devel (done "Package zlib-devel-1.2.3-27.el6.x86_64 already installed and latest version"), zlib1g ("No package zlib1g available."), zlib1g-devel (same as before).

Any ideas?



[root@sa09b tmp]# zlib

-bash: zlib: command not found

could that be it?

Edit 2:

  • So the line which fails is "from setuptools.command.easy_install import main"
  • I think this is because the .egg file with setuptools needs to be extracted with zlib
  • I tried installing pip, but that requires setuptools too.
  • I can't use easy_install-2.7 for some reason. But easy_install for 2.6 works fine.

Edit 3:

"find" can't actually find anything to do with zlib in the system, other than python, despite yum saying its installed.

[root@sa09b pip-1.2.1]# find / -name zlib
share|improve this question

I found the answer from another stackoverflow user.

Basically you can just copy zlib pre gcc'd from 2.6 to 2.7:

cp /usr/lib64/python2.6/lib-dynload/ /usr/local/lib/python2.7/lib-dynload/

Still hackish though.

share|improve this answer
Nice. This worked for me. – ftkg Oct 15 '13 at 18:08
work like a charm. – BlaShadow Dec 9 '13 at 1:51

I've had a similar problem. In my case the issue was that I had to install zlib-devel along other packages (see here before building Python-2.7. Once the packages are installed, running ./configure for Python makes all the difference of detected libraries and subsequently make && make altinstall links them.

share|improve this answer

You example of attempting to execute zlib does NOT indicate presence (or absence) of zlib...only that the zlib command does not exist.

zlib is simply a library of routines.

What you need to look at is what version of zlib needs to be installed and used by all the programs. I suspect either the errant program is looking in the wrong place, or it needs a different version than is installed, or the program needing it is old and needs upgrading.

share|improve this answer
Please can you explain a bit further? I'm really stuck on this. (see second edit). – LittleBobbyTables Jan 3 '13 at 19:16

You must log in to answer this question.

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