1、Centos升级后,pip时会报如下错误:
Traceback (most recent call last):
File "./pip", line 5, in <module>
from pkg_resources import load_entry_point
File "/opt/soft/distribute-0.7.3/pkg_resources.py", line 2989, in <module>
working_set.require(__requires__)
File "/opt/soft/distribute-0.7.3/pkg_resources.py", line 726, in require
needed = self.resolve(parse_requirements(requirements))
File "/opt/soft/distribute-0.7.3/pkg_resources.py", line 624, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: pip==1.5.5
是因为python升级后版本不对应的原因,需要重新安装pip。
2、
CentOS 升级Python2.7后, yum出现“No module named yum”错误:
由于yum命令不兼容python2.7,需修改/usr/bin/yum文件,将第一行由“#!/usr/bin/python”改为“#!/usr/bin/python2.6",而“#!/usr/bin/python”的软链接是python2.7。