执行yum 的时候提示 No module named yum

------------------------------------------------------------------------------------------------
出错提示
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

------------------------------------------------------------------------------------------------
查找资料后说是python 版本的问题。
[root@clients ~]# python --version
Python 2.6.5
------------------------------------------------------------------------------------------------
[root@clients ~]# whereis python
python: /usr/src/Python-2.6.5/python /usr/bin/python2.4 /usr/bin/python2.6 /usr/bin/python /usr/bin/python2.6-config /usr/lib/python2.4 /usr/lib/python2.6 /usr/local/bin/python2.6 /usr/local/bin/python /usr/local/bin/python2.6-config /usr/local/lib/python2.6 /usr/include/python2.4 /usr/include/python2.6 /usr/share/man/man1/python.1.gz /usr/share/man/man1/python.1
------------------------------------------------------------------------------------------------
解决办法
修改yum文件
#vi /usr/bin/yum
将 #!/usr/bin/python 修改为  #!/usr/bin/python2.4
再次运行yum,一切正常!