Python on Linux

Installing on Linux

You will most likely find Python already installed on your Linux distribution, however it might be Python 2.6 and you want or need Python 2.7 or the latest Python 3. It is important to note that some critical system utilities might depend on Python 2.6, yum on CentOS for example. In which case you need to take great care installing a different version of Python, otherwise you will break yum!. Hence I strongly recommend reading and using How to install Python 2.7 and 3.3 on CentOS 6 | Too Much Data which I have done myself with great success. However I did not run the same make commands on one line, I did them separately as follows:
sudo make
sudo make altinstall

Then it all worked just fine. If you want to test then the following commands should return the default Python version, which should be unchanged at Python 2.6:
python --version
/usr/bin/python --version

The following should then return your nice new Python 3:
/usr/local/bin/python3.3 --version
So now, all is well, you have left your default Python in place but have the latest Python 3 ready to rock!