HELP! No module named yum

Issues related to applications and software problems
Post Reply
User avatar
leonardopereira
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.
Attachments
error yum.png
error yum screenshot
error yum.png (37.24 KiB) Viewed 254 times

User avatar
TrevorH
Forum Moderator
Posts: 23468
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 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply