HELP! No module named yum

Issues related to applications and software problems
Post Reply
User avatar
Posts: 1
Joined: 2018/07/23 20:48:25

HELP! No module named yum

Post by leonardopereira » 2018/07/26 15:18:13

Good afternoon.

After changing the Python version in CentOS 6.9, I can no longer run yum. How do I restore this module without having to reinstall the entire operating system? :shock:

See screenshot attached.
error yum screenshot
error yum screenshot
error yum.png (37.24 KiB) Viewed 1151 times

User avatar
Forum Moderator
Posts: 29112
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: HELP! No module named yum

Post by TrevorH » 2018/07/26 15:30:52

You cannot update the system python in CentOS or lots of things will break. You now need to undo everything that you did - hopefully you installed into /usr/local rather than /usr and you can just make uninstall or rm the various files/directories, run ldconfig and hash -r. If not then you will have to undo what you did then download all the packages that appear in the output from rpm -Va and manually install them.

If you need newer python versions then look at either EPEL or IUS both of which provide parallel installs of various python versions that can coexist with the system python and not entirely screw your system.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply

Return to “CentOS 6 - Software Support”