Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I believe I am running CentOS 5.5 (64-bit) on CA AppLogic 3.0.

uname -a says

Linux LINUX64 2.6.18-194.32.1.el5xen #1 SMP Wed Jan 5 18:44:24 EST 2011 x86_64 x86_64 x86_64 GNU/Linux

I have upgrade with yum upgrade, but my Python is still in version 2.4.3.

yum info python says

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base:
 * extras:
 * updates:
Installed Packages
Name       : python
Arch       : x86_64
Version    : 2.4.3
Release    : 46.el5
Size       : 72 k
Repo       : installed
Summary    : An interpreted, interactive, object-oriented programming language.
URL        :
License    : PSF - see LICENSE
Description: Python is an interpreted, interactive, object-oriented programming
           : language often compared to Tcl, Perl, Scheme or Java. Python
           : includes modules, classes, exceptions, very high level dynamic data
           : types and dynamic typing. Python supports interfaces to many system
           : calls and libraries, as well as to various windowing systems (X11,
           : Motif, Tk, Mac and MFC).
           : Programmers can write new built-in modules for Python in C or C++.
           : Python can be used as an extension language for applications that
           : need a programmable interface. This package contains most of the
           : standard Python modules, as well as modules for interfacing to the
           : Tix widget set for Tk and RPM.
           : Note that documentation for Python is provided in the python-docs
           : package.

I think I read once somewhere that yum depends on python so I shouldn't remove that. So should I download python version 2.7.x as a source and compile it? Or is there a way to upgrade Python with yum (somehow)?

I am planning using the latest version 2.x of Python for Django.

share|improve this question
up vote 3 down vote accepted

There's python26 package available from epel repo. It should be better and easier option then installing manually.

However, please note that you probably won't be able to replace default python with 2.6 or any other version, as there are a lot of stuff build for 2.4 and upgrading it would require you to rebuild lots of packages and resulting system would not be really CentOS 5. I think it's easier to upgrade to CentOS 6 then to rebuild so much packages.

share|improve this answer

Yea compile it from source:

yum install gcc gcc-c++.x86_64 compat-gcc-34-c++.x86_64 openssl-devel.x86_64 zlib*.x86_64

install python 2.7

tar -xvjf Python-2.7.tar.bz2
cd Python*
./configure --prefix=/opt/python27
make install
vi ~/.bash_profile

replace PATH=$PATH:$HOME/bin
with PATH=$PATH:$HOME/bin:/opt/python27/bin

reload .bash_profile

source ~/.bash_profile
echo "/opt/python27/lib" > /etc/
share|improve this answer

Your Answer


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.