yum---no module named yum

cjmandlulu picture cjmandlulu · Sep 5, 2013 · Viewed 38.8k times · Source

when I use yum in the shell,the error message is no module named yum, so I edit the /usr/bin/yum change the first line to another version of python, but nothing changes,and when I user different python to import yum, it brings out different error enter image description here

enter image description here

and when i use yum ,the message is like this: enter image description here the yum is ok before i use "rpm -e --nodeps pycurl" to remove pycurl...i need some help:(

Answer

PytLab picture PytLab · Sep 19, 2014

Changing the first line of /usr/bin/yum to the default version of python may help.

eg.change #!/usr/bin/python to #!/usr/bin/python2.4