After updating python yum stop working

Latest response

After updating python from Python-2.7.5 to be Python 2.7.14
Yum gave the following error:

yum update

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.14 (default, Dec 20 2017, 14:47:38)
[GCC 4.8.3 20140911 (Red Hat 4.8.3-9)]

If you cannot solve this problem yourself, please go to
the yum faq at:


Did you install a third-party version of Python? It likely conflicts with the Red Hat provided version. Due to the tight coupling between RHEL and Python, you cannot replace the default Python binary with a different version without creating conflicts like you are experiencing.

If you need a newer version of Python, you need to compile/install it so that its binary and libraries do not conflict with the Python package available on RHEL by default.

For newer versions of Python, you'll want to install the Red Hat Software Collection versions - they install "along side" the base Python so you won't end up with compatibility issues.

Read about them [here] (

yes i did (compile/install) for the newer version of python.

The following solved me problem as i added an alias in .bashrc:

alias yum='LD_LIBRARY_PATH=/usr/lib64 yum'

Also examine this link for applicability.

Additionally, I would consider what Mike Guerette of Red Hat said above (Red Hat Software Collections) for any versions of python that need to be higher than what is provided standard by Red Hat. We use Red Hat Software collections where I work, generally without any issues.