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.