Monday, February 10, 2014

Use Python2.6 (instead of Python2.7) on Ubuntu Server 12.04

Ubuntu Server 12.04 comes with Python version 2.7 by default. Unfortunately, there are some apps development out there that still using Python 2.6. Here are some simple workaround to change the default Python2.7 to Python2.6:

1. Preliminary requirement:
$ sudo apt-get install python-software-properties
2. Adding PPA (because Python2.6 is not available anymore on Ubuntu Server 12.04, by default):
$ sudo add-apt-repository ppa:fkrull/deadsnakes
3. Update repository:
$ sudo apt-get update
4. Installing Python2.6:
$ sudo apt-get install python2.6 python2.6-dev
5. Change the symlink to Python2.6:
$ sudo ln -sfn /usr/bin/python2.6 /usr/bin/python
6. Check the version:
$ python --version

That's it, and you're done :)