报错:
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
from pip import main
ImportError: cannot import name main
报错原因:
网上查了说是pip的bug。
解决办法:
打开/usr/bin/pip
原来:
"""
from pip import main
if __name__ == '__main__':
sys.exit(main())
"""
改为:
from pip import __main__
if __name__ == '__main__':
sys.exit(__main__._main())