Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.
  • 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 http://peak.telecommunity.com/dist/ez_setup.py

[root@sa09b tmp]# python2.7 ez_setup.py Downloading

http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg

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

main(sys.argv[1:]) File "ez_setup.py", 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: ftp1.scientificlinux.org

  • sl-security: ftp1.scientificlinux.org

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?

:-)


Edit:

[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
/tmp/Python-2.7.3/Demo/zlib
/tmp/Python-2.7.3/Modules/zlib
share|improve this question

2 Answers 2

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/zlibmodule.so /usr/local/lib/python2.7/lib-dynload/zlibmodule.so

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

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.