Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I tried

yum update python

and

yum upgrade python

both came up with results with endline: "No Packages marked for Update"

I currently have

Python 2.4.3 (#1, Sep  3 2009, 15:37:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2

Apparently, the latest version of python is 3.x already ... what's the best way to upgrade?

share|improve this question

4 Answers 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...

share|improve this answer

Yum:

* A yum repository is available for your convenience. For Fedora Core 3, create "/etc/yum.repos.d/python25.repo" with the following lines:

  [python25]
  name=Fedora Core $releasever - $basearch - Python 2.5
  baseurl=http://www.python.org/ftp/python/2.5/rpms/fedora-$releasever/
  enabled=1
  gpgcheck=1

Add the KRUD GPG key by running: "rpm --import http://www.python.org/ftp/python/2.5/rpms/KRUD-GPG-KEY"

yum install python

it working for me

share|improve this answer

Just install python from source to a different directory (e.g. /opt/python2.6). python2.4 is left intact so RHEL/Centos is happy. You can then use the command python2.6 (or whatever version) all you want to create virtualenvs, run mod_wsgi, etc, etc. I have this setup running on a RHEL 5 box and it's running Great!

share|improve this answer

I wrote it about it once here

share|improve this answer
1  
It would be good practice if you include the relevant parts –  Lucas Kauffman Jul 22 '12 at 10:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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