Python 2.7 comes with Ubuntu 12.04 Precise default installation, version 2.6 is excluded from the default repository. This tutorial will explain how to install python 2.6 in Ubuntu 12.04 Precise for legacy software that runs only on python 2.6.

Install Python 2.6 on Ubuntu 12.04:

  • 1. Open terminal from the dash home or press Ctrl+Alt+T, execute this command to add the ppa ppa:fkrull/deadsnakes to your repository:
    sudo add-apt-repository ppa:fkrull/deadsnakes
  • 2. Update the source via command:
    sudo apt-get update
  • 3. Install python 2.6:
    sudo apt-get install python2.6 python2.6-dev

This ppa also include other old and new python versions, check on this page