**

更新pip10后 ImportError: cannot import name ‘main’

**

解决:找到报错文件,也就是那个pip,然后cd进目录 vi 编辑pip,将里面的内容改为如下所示:
## 更新pip10后 ImportError: cannot import name ‘main'

#!/usr/bin/python
# GENERATED BY DEBIAN

import re
import sys

# Run the main entry point, similarly to how setuptools does it, but because
# we didn't install the actual entry point from setup.py, don't use the
# pkg_resources API.
from pip._internal import main as _main
if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
    sys.exit(_main())

标注两行sys前面不能有tab,只能空格

转载https://www.cnblogs.com/dylan9/p/8981155.html

相关文章:

  • 2021-10-04
  • 2022-12-23
  • 2022-12-23
  • 2021-09-22
  • 2022-12-23
  • 2021-07-16
  • 2021-07-31
  • 2021-05-14
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-27
  • 2021-07-18
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案