July 2010
M T W T F S S
« Jun    
 1234
567891011
12131415161718
19202122232425
262728293031  
86

Categories

Archives

Installing Python 2.5 on CentOS 5

I needed to do this to get Trac’s gitPlugin working. The gitPlugin has a requirement for Python 2.5. After googling I stumbled into the blog.bashton.com site which provided a SRPM from which I could build the i386 version of Python 2.5. See my previous post about how to get this SRPM built and installed.

Once I got Python 2.5’s RPMS installed I wanted to get setuptools installed. So I kinda sorta loosely followed along this blog post over on perplexedlabs.com.

Point python to python25
1
alias python=/usr/bin/python25
Installing setuptools
1
2
3
4
5
6
7
8
9
10
11
12
13
# download setuptools
% wget http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c9-py2.5.egg
# install
% sh setuptools-0.6c9-py2.5.egg
Processing setuptools-0.6c9-py2.5.egg
Copying setuptools-0.6c9-py2.5.egg to /usr/lib/python2.5/site-packages
Adding setuptools 0.6c9 to easy-install.pth file
Installing easy_install script to /usr/bin
Installing easy_install-2.5 script to /usr/bin
 
Installed /usr/lib/python2.5/site-packages/setuptools-0.6c9-py2.5.egg
Processing dependencies for setuptools==0.6c9
Finished processing dependencies for setuptools==0.6c9

Installing MySQLdb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
% easy_install MySQL-python
Searching for MySQL-python
Reading http://pypi.python.org/simple/MySQL-python/
Reading http://sourceforge.net/projects/mysql-python
Reading http://sourceforge.net/projects/mysql-python/
Best match: MySQL-python 1.2.3b1
Downloading http://pypi.python.org/packages/2.5/M/MySQL-python/MySQL_python-1.2.3b1-py2.5-linux-i686.egg#md5=43ace300f3eda0fc418869b04a5139eb
Processing MySQL_python-1.2.3b1-py2.5-linux-i686.egg
Moving MySQL_python-1.2.3b1-py2.5-linux-i686.egg to /usr/lib/python2.5/site-packages
Adding MySQL-python 1.2.3b1 to easy-install.pth file
 
Installed /usr/lib/python2.5/site-packages/MySQL_python-1.2.3b1-py2.5-linux-i686.egg
Processing dependencies for MySQL-python
Finished processing dependencies for MySQL-python
Installing MySQL
1
% yum -y install mysql
Test out python25 setup thus far …
1
2
3
4
5
6
% python
Python 2.5.1 (r251:54863, Mar  4 2009, 00:53:48) 
[GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
>>> import MySQLdb

Looks good!

1 comment to Installing Python 2.5 on CentOS 5

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>