[CentOS] how to use python 2.7 by default instead python 2.6 on centos 6.8

Mon Jul 4 18:53:32 UTC 2016
Александр Кириллов <nevis2us at infoline.su>

> centos 6.8 comes with python 2.6. But I want to use python 2.7 to
> build gstreamer sdk. I have built python 2.7 and installed it into my
> custom directory. How to set centos to use python 2.7 by default
> instead of python 2.6?

You could have used python virtualenv.

I'm not a python dev and only have vague memories and some short notes 
on the subject.
FYI I have all my python 2.7 packages installed from 
PUIAS_6_computational repo which had a better selection of python 
packages at the time:

python27-2.7.8
python27-virtualenv-1.10.1
...

When you have python27-virtualenv package you can create and activate a 
virtual environment with the following commands:

$ mkdir ~/opt/python27
$ virtualenv-2.7 ~/opt/python27
$ . ~/opt/python27/bin/activate

(python27) prefix will be added to the shell prompt and all subsequent 
python calls will use version from the virtual environment.

(python27) $ python --version
Python 2.7.8

...

(python27) $ deactivate

HTH