升级完python2.7.11后问题
2016-04-12 22:36
465 查看
安装完python2.7.11后用了几天挺好,但是今天用yum的时候发现了问题
[root@template yum.repos.d]# yum list
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.11 (default, Apr 7 2016, 21:10:55)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-16)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
上网查了一下才知道原来yum是需要python环境的,python2.7.11太新了,需要改回旧的版本
which yum
whereis python
vim /usr/bin/yum
将#!/usr/bin/python 改为#!/usr/bin/python2.6
[root@template yum.repos.d]# yum list
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.11 (default, Apr 7 2016, 21:10:55)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-16)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
上网查了一下才知道原来yum是需要python环境的,python2.7.11太新了,需要改回旧的版本
which yum
whereis python
vim /usr/bin/yum
将#!/usr/bin/python 改为#!/usr/bin/python2.6
相关文章推荐
- 每天一篇python:系统篇
- python爬虫——根据指定关键词爬取新浪微博
- ArcGIS Desktop python Add-in 创建一个插件
- python子进程模块subprocess详解与应用实例 之一
- 关于python中字典的一些总结
- 关于python中字典的一些总结
- 关于python中字典的一些总结
- python中使用fork创建新的进程
- Python学习笔记(六)
- Python学习笔记-偏函数
- 八大排序的python实现
- python包管理
- python科学计算基础知识
- LeetCode-two sum:python解答数组问题
- ipython 运维工具(一)
- python 基础知识四、字典
- 使用python来处理excel表《1》
- 【leetcode】sort list(python)
- truncate file python
- 0412python中文处理小记