Uaktualnij Pythona bez zrywania Yum

Niedawno zainstalowałem Pythona 2.7.3 na maszynie CentOS, kompilując ze źródła. Python 2.7.3 jest instalowany w /opt/python2.7 i kiedy go zainstalowałem, po prostu zmieniłem / usr / bin / python, aby wskazać nową wersję. To najwyraźniej jest złe, ponieważ kiedy to zrobiłem, złamało się to. Otrzymałbym następujące.

There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

   No module named yum

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.7.3 (default, May 15 2012, 17:45:42) 
[GCC 4.4.4 20100726 (Red Hat 4.4.4-13)]

If you cannot solve this problem yourself, please go to 
the yum faq at:
  http://yum.baseurl.org/wiki/Faq

Zmieniłem / usr / bin / python, aby wskazywał na python 2.6.6, ale teraz 2.6.6 jest domyślną wersją pythona. Jakiś pomysł jak to naprawić?

questionAnswers(7)

yourAnswerToTheQuestion