pip版本过高导致报错
[root@localhost send_wrong_sql]# pip
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
load_entry_point('pip==21.0.1', 'console_scripts', 'pip')()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 378, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2566, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2260, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/usr/lib/python2.7/site-packages/pip/_internal/cli/main.py", line 60
sys.stderr.write(f"ERROR: {exc}")
^
解决办法:
使用easy_install安装
PIP已经放弃了对Python 2.7的支持,导致上述问题,所以唯一的办法就是降低PIP的版本。使用easy_install安装并指定版本20.3.4,
sudo easy_install pip==20.3.4