RHEL 6 contains a system installation of python 2.6.
If you want to use another version of python e.g. python 2.7 you have a number of options:
build the standard python distribution from source
- see an example installation
- it can be customised to include/exclude the features needed
- but it does not contain the fixes and tweaks added by the OS vendor
build an rpm from source
- there is a source rpm on the fedora site
- but it is unclear how to install this safely next to the official python 2.6
use the prebuilt rpms from “Redhat software collections”
- Redhat provides a way to install newer versions of Python, Ruby, … that do not interfere with the official distributions
- more installation information here and here
- general information about Software Collections: redhat blog
- those instructions use a test-repo, the supported RHAT channel can be enabled with: ‘rhn-channel –add –channel=rhel-x86_64-server-6-rhscl-1′ (not tested yet)
- it uses a separate RPM repo. If it the repo is not enabled, a system upgrade does not automatically upgrade these packages.
- if you want to use python 2.7 as a default in your session, execute the command ‘source /opt/rh/python27/enable’