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
and when i use yum ,the message is like this: the yum is ok before i use "rpm -e --nodeps pycurl" to remove pycurl...i need some help:(
To start programming with YUM, we need to import the `yum` python package – this is installed by default in CENTOS 7. Along with `yum` we usually need the `os` and `sys` packages as well – so a typical python program using yum would begin with the following 3 lines.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With