After pip is updated to 10.0, the error ImportError: cannot import name 'main' is reported

ImportError: cannot import name ‘main’

The pip update is very fast, and now it has reached version 10.0. Some libraries need to be downloaded using this, but many friends have found that this error has been reported after the update

**

ImportError: cannot import name ‘main’

**

Just open the pip-scripts file under Scripts and change it to the following

write picture description here
write picture description here

Just copy it

# -*- coding: utf-8 -*-
import re
import sys

from pip import __main__

if __name__ == '__main__':
    #sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
    sys.exit(__main__._main())

please help

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325577359&siteId=291194637