转载:https://blog.csdn.net/zong596568821xp/article/details/80410416
方法一:
sudo gedit /usr/bin/pip
将原来的 :
from pip import main
改为:
from pip._internal import main
方法二:
sudo gedit /usr/bin/pip
将原来的:
from pip import main
if __name__ == '__main__':
sys.exit(main())
改为:
from pip import __main__
if __name__ == '__main__':
sys.exit(__main__._main())