CentOS 5.3 vs. Python 2.5

Steven D'Aprano steven at REMOVE.THIS.cybersource.com.au
Wed Nov 25 03:13:04 EST 2009


On Tue, 24 Nov 2009 22:42:28 -0800, John Nagle wrote:

> My dedicated hosting provider wants to switch me to a new server with
> CentOS 5.3, so I have to look at how much work is required.
> 
>     CentOS 5.3 apparently still ships with Python 2.4.  Worse, it
> requires Python 2.4 for its own internal purposes, and actually
> installing Python 2.5 breaks the package manager.  There's no supported
> RPM for upgrading.
> 
>     It's apparently necessary to build Python 2.5 from source,
> build all the packages, and debug.


You shouldn't need *quite* that much effort, particularly if you don't 
care about tkinter. Just use the alternate installation so it doesn't 
stomp all over the 2.4 installation:

.configure
make
make altinstall

You will need root or sudo for that last one.


I don't have Centos 5.3, but I have Centos 5, and it seems to work fairly 
easily for me:

$ wget http://www.python.org/ftp/python/2.5.4/Python-2.5.4.tgz
...
18:39:11 (69.6 KB/s) - `Python-2.5.4.tgz' saved [11604497/11604497]
$
$ tar xzf Python-2.5.4.tgz
$ cd Python-2.5.4
$ ./configure
...
$ make
...
$ sudo make altinstall
Password: 
...
$ python -V
Python 2.4.3
$ python2.5 -V
Python 2.5.4


And it all seems to just work for me.




> Nor does that "just work". There's
> documentation, but some of it is in Japanese.
> 
> http://blog.bashton.com/2008/python-25-rpms-for-rhel-5-centos-5/

I don't understand why you're using documentation for third-party RPMs as 
evidence that building from source will be troublesome.



-- 
Steven



More information about the Python-list mailing list