I want Python 2.5, not 3.0.
Can I use yum update
for this?
I want Python 2.5, not 3.0.
Can I use yum update
for this?
Your system python is on 2.4.3 because that's what all the applications in your distro is tested with. You don't want to upgrade or replace that version.
Install Python 2.5 from source instead. I'd recommend keeping it well out of /usr, and installing it in /opt/python25 or something, and running it from there for your custom apps. If you want to install it in /usr or /usr/local, install it with make altinstall so you the python command continues to be python2.4.
You can't upgrade Python with yum - because yum runs in Python, and it will break itself (I've done this, and it sucked).
You need to install either from a stand-alone .rpm or from source.
Don't upgrade the default Python installed with your distro and preferably, don't even use it except for sysadmin tasks that will run on that one box. Instead, build your own Python and install it in either your home directory, or perhaps into /python25 or /python26.
An easy way to do this is to go to this Activestate page and download the binary tarball AS package for your system and architecture. Once you untar this, there is a shell script to run which installs it into the directory of your choice.
I generally name the binary either apy25 or py25 so that I never get confused between the two or more Pythons installed. You might want to link the binary into your /usr/bin and edit your .bashrc as well.
If you are happy with python 2.6 then there are well maintained packages available in the EPEL repository. The steps involved would be (as root, or with sudo):
rpm -Uvh http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
yum install python26
There are quite a few python 2.6 packages in EPEL, you can see the list by doing:
yum search python26
A key advantage of this is that you will get bug fix updates for python 2.6 through yum, along with all your other updates.
(I'm assuming you are on CentOS 5 if python 2.4 is the packaged version).