• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

linux 下pip升级报错

互联网 diligentman 4周前 (01-30) 15次浏览

环境:python2.7

报错内容:

Traceback (most recent call last):
  File "/usr/bin/pip", line 9, in <module>
    load_entry_point('pip==21.0', '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}")

解决办法:

yum remove python-pip

cd /usr/local/src
wget https://bootstrap.pypa.io/2.7/get-pip.py
python get-pip.py

pip -V

 


程序员灯塔
转载请注明原文链接:linux 下pip升级报错
喜欢 (0)