Please read the update to this article Setup Python 2.6.4, mod_wsgi 2.6, and Django 1.1.1 on CentOS 5.3 (cPanel)
Installing Python 2.5 dependencies
Install sqlite3:
$ wget http://www.sqlite.org/sqlite-amalgamation-3.6.4.tar.gz
$ tar xvfz sqlite-amalgamation-3.6.4
$ cd sqlite-amalgamation-3.6.4.tar.gz
$ ./configure
$ make
$ make install
Install Python 2.5
Download Python 2.5 source package, unzip, and enter working directory:
$ cd
$ wget http://python.org/ftp/python/2.5/Python-2.5.tgz
$ tar xvfz Python-2.5.tgz
$ cd Python-2.5
Configure Python 2.5 [...]