LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-29-2013, 06:31 PM   #1
x201s
Member
 
Registered: Dec 2010
Posts: 67

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


I did search the web, but couldn't make it work.
They all say I need zlib-devel installed.
I *do* have zlib-devel installed. (both 32 bit and 64 bit)

OS: RHEL 5.5, purchased license only, self-support
64 bit machine.

Story:
I needed Python 2.6, and I installed it, but ended up screwing things up- now Python 2.6 is the default one in
my system, when I type "pyhton" anywhere, I get 2.6.

What I want: I want the (old) default = python 2.4= from everywhere
EXCEPT that isolated environment, let's say from "/home/myenv/env1".
Put other way: when I am inside "env1" and when I have activated this isolated environment, I want to see 2.6, all else 2.4.

I admit that I did not specify 2.6 installation directory. when I ran this command to install the 2.6 version.
Code:
./configure --prefix=/your-preferred-directory/ --with-package=_ssl
Currently, the 2.6 bunches are installed in /usr/local/bin.

It is mystery to me that there is no directive in .bashrc or in
.bash_profile about this new python 2.6, yet the default has been set to 2.6.

How to go back to 2.4?

Cuttent sys.path:

Code:
>>> import sys
>>> print sys.path
['', '/usr/local/lib/python26.zip', '/usr/local/lib/python2.6',
'/usr/local/lib/python2.6/plat-linux2',
'/usr/local/lib/python2.6/lib-tk', '/usr/local/lib/python2.6/lib-old',
'/usr/local/lib/python2.6/lib-dynload',
'/usr/local/lib/python2.6/site-packages',
'/usr/local/lib/python2.6/site-packages/PIL']
Actually, I wanted to remove 2.6 and re-install. I wanted to remove 2.6 because I tried to install "virtualenv sandbox", but I got error:

Code:
[root@user1 downloads]# /usr/local/bin/python ez_setup.py
Downloading
http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c11-py2.6.egg
Traceback (most recent call last):
File "ez_setup.py", line 278, in <module>
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
Google told me I needed zlib-devel. I downloaded both 32 and 64 bit
lib-devel-1.2.3-4.el5. Yet, I still got "zlib not available".

So I wanted to remove 2.6 and start over again.

Could it be that my python ("2.6") cannot find those
zlib-devels? If true, how do I find where zlib-devels are installed and how do I tell the system to use that information?

Thank you for reading this long post.
 
  


Reply

Tags
python2.6



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] tar.xz decompress? Benyi Linux From Scratch 9 02-18-2012 07:29 PM
zlib data errors patrickdepingui Programming 1 06-03-2007 04:19 AM
no matching comp found: client zlib none, zlib@openssh.com lost connection jorge_ivan Linux - Networking 0 08-14-2006 07:09 PM
Decompress gtgoku Linux - Software 2 04-06-2005 09:19 PM
I can't decompress qt bcf2 Linux - Newbie 3 10-29-2004 09:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration