关于linux下yum不能使用,和Python版本有关!就是解决不了!

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.10 (default, Nov 21 2016, 18:47:42)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)]

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

自己在百度上找了很久,都是说是Python的问题,因为不久前安装lnmp一键安装失败,也不知道什么原因,yum失效!卸载yum相关的rpm包重新安装,也重新安装了在百度上的几个Python的相关rpm包。改过/usr/bin/yum里的#/usr/bin/python的版本,也不管用。
求帮助!

看上去是你系统环境缺省的python中的yum模块找不到了。自己下载一个python的yum包安装试试