Linux – In CentOS, how to update Python 2.4.3 to 2.5
linuxpythonupdateyum
I want Python 2.5, not 3.0.
Can I use yum update for this?
Best Answer
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.
Well, the short of it is that you can't (or at least shouldn't). A lot of CentOS (And RHEL) internal programs (including yum) depend upon 2.4...
However, you can install 2.6 from the epel repository. The package is named python26, and the command is either python26 or python2.6 instead of python... Note, don't change the python command to point to python26 for the above reason...
Best Answer
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.