up vote 0 down vote favorite
share [g+] share [fb]

I want python 2.5, not 3.0.

How to do yum update for this?

link|improve this question

feedback

migrated from stackoverflow.com Nov 4 '09 at 8:36

This question came from our site for professional and enthusiast programmers.

4 Answers

up vote 4 down vote accepted

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|improve this answer
What if one of my applications requires python 2.4? – Alex Nov 3 '09 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. – Anonymous Nov 3 '09 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 '09 at 22:14
feedback

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

That was the second hit when I googled the subject line

link|improve this answer
feedback

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|improve this answer
feedback

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|improve this answer
feedback

Your Answer

 
or
required, but never shown

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