更新pip10后 ImportError: cannot import name ‘main'(转)
解决:找到报错文件,也就是那个pip,然后cd进目录 vi 编辑pip,将里面的内容改为如下所示:
# -*- coding: utf-8 -*- import re import sys 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())