Python – Install a Python2.5 on Ubuntu Lucid @ 2

Another way to install extra Python package is by source.

1. Install the build-essential and gcc.

  • sudo apt-get install build-essential gcc

 

2. Go to your target installation directory (usually i put them in /usr/local), download the source file.


 

3. Extract the source archive.

  • tar -xvzf Python-2.5.6.tgz
  • cd Python-2.5.6

 

4. Build and install.

  • ./configure –prefix=/usr/local/python2.5
  • make
  • make test
  • sudo make install

 

5. In the above steps, you may encounter the missing dependencies error such as

  • ImportError: No module named _sqlite3

 

6. In that case, install the missing dependencies.

  • apt-get install libsqlite3-dev
  • apt-get install libbz2-dev

 

7. After the installation is completed, create the symbolic link in /usr/bin for the new Python 2.5.

  • sudo ln -s /usr/local/python2.5/bin/python /usr/bin/python2.5

 

Done =)

Reference:

2 thoughts on “Python – Install a Python2.5 on Ubuntu Lucid @ 2”

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.