vote up 0 vote down star

I want python 2.5, not 3.0.

How to do yum update for this?

flag

79% accept rate

migrated from stackoverflow.com

4 Answers

vote up 5 vote down check

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.

link|flag
What if one of my applications requires python 2.4? – Alex Nov 3 at 22:05
Then it will be fine, since Python 2.4 will still be the default Python on your system if you follow Lennart's instructions. – user18231 Nov 3 at 22:14
1  
Then you run it with Python 2.4. There is no problem with having multiple versions of Python installed. – Lennart Regebro Nov 3 at 22:14
vote up 1 vote down

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.

link|flag
vote up 0 vote down

install-python-2-5-on-redhat-centos

That was the second hit when I googled the subject line

link|flag
vote up 0 vote down

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.

link|flag

Your Answer

Get an OpenID
or
never shown

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