/usr/bin/python is still pointing at the original Python 2.6 shipped with CentOS 6, so that doesn't seem to be the problem. You can double check that with
/usr/bin/python --version to confirm it works.
The most likely problem is that your Python 2.7 install overwrote some other file/directory in the shipped Python install from the system, probably something under
/usr/lib/python, maybe a
site-packages directory or similar.
You can use an
rpm -V command ("V" for "verify") to ask the RPM package manager to tell you about which files were modified since a package was installed. For instance, to verify all the Python and Yum packages, use this command:
# rpm -Va 'python*' 'yum*'
Look at the rpm documentation for help with the output format, but in any case, if you see a "5" flag listed next to a file, that means the MD5 doesn't match the one from the database, which means that file was modified.
Since yum itself isn't working, it's hard to say how you could recover from this situation... Unless the
rpm -V output lists something fairly obvious and fixing that seems enough, it would be hard or work intensive to download the RPMs by hand and reinstall them... If reinstalling your machine from scratch is an option, maybe you should consider doing that.
You should take extra care when installing software that doesn't come from your OS provider, particularly on a distribution such as CentOS (since the great selling point of CentOS and its upstream RHEL is their support for keeping older packages up to date on security issues, you lose that when you install software that is not managed by yum.) If you still think you should install, say, Python 2.7, try to do so under a separate directory structure such as
/usr/local, so you don't disturb the Python install from the distribution under
More to the point... If you need Python 2.7, have you considered using CentOS 7 instead? CentOS 6 is pretty ancient at this point... CentOS 7 ships with Python 2.7 already, so unless you have a strong reason to stay on CentOS 6 (and I can't really imagine a good one), consider moving to the newer release.