首页前端开发HTMLNo module named yum 错误

No module named yum 错误

时间2024-01-25 12:05:45发布访客分类HTML浏览749
导读:收集整理的这篇文章主要介绍了html5教程-No module named yum 错误,觉得挺不错的,现在分享给大家,也给大家做个参考。小宝典致力于为广大程序猿(媛)提供高品质的代码服务,请大家多多光顾小站,小宝典在此谢过。 在cent...
收集整理的这篇文章主要介绍了html5教程-No module named yum 错误,觉得挺不错的,现在分享给大家,也给大家做个参考。小宝典致力于为广大程序猿(媛)提供高品质的代码服务,请大家多多光顾小站,小宝典在此谢过。

在centos上,yum工具是一个很好用、很强大的工具,在系统一些软件升级之后,特别是python升级之后,发现yum 不好用了。

出现这样的错误提示

[htML] 
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.2 (default, Nov  8 2012, 23:03:00)  
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] 
 
If you cannot solve this problem yourself, please go to  
the yum faq at: 
  https://wiki.linux.duke.edu/YumFaq

错误提示python版本不匹配,修改yum工具默认的python版本。
[html] 
vi /usr/bin/yum 
打开脚本文件
[html] 
#!/usr/bin/python 
import Sys 
try: 
    import yum 
。。。。。。。 
修改为
[html]
#!/usr/bin/python2.4 
import sys 
try:  www.2cto.COM
    import yum 
except ImportError: 
因为重新升级或者安装了python,所以重新指定版本。

在centos上,yum工具是一个很好用、很强大的工具,在系统一些软件升级之后,特别是python升级之后,发现yum 不好用了。

出现这样的错误提示

[html] 
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.2 (default, Nov  8 2012, 23:03:00)  
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] 
 
If you cannot solve this problem yourself, please go to  
the yum faq at: 
  https://wiki.linux.duke.edu/YumFaq

错误提示python版本不匹配,修改yum工具默认的python版本。
[html] 
vi /usr/bin/yum 
打开脚本文件
[html] 
#!/usr/bin/python 
import sys 
try: 
    import yum 
。。。。。。。 
修改为
[html]
#!/usr/bin/python2.4 
import sys 
try:  www.2cto.com
    import yum 
except ImportError: 
因为重新升级或者安装了python,所以重新指定版本。

觉得可用,就经常来吧! 欢迎评论哦! html5教程,巧夺天工,精雕玉琢。小宝典献丑了!

声明:本文内容由网友自发贡献,本站不承担相应法律责任。对本内容有异议或投诉,请联系2913721942#qq.com核实处理,我们将尽快回复您,谢谢合作!

divHTMLImportpost-format-gallerythis

若转载请注明出处: No module named yum 错误
本文地址: https://pptw.com/jishu/586495.html
利用Jekyll-Bootstrap搭建github blog 简单记录 Chrome中利用HTML5实现具有文件“编辑”及“下载”功能的本地应用

游客 回复需填写必要信息