-
升级了一下pip,然后:
Traceback (most recent call last): File "/usr/bin/pip", line 9, in <module> from pip import main ImportError: cannot import name main
- 解决:
-
修改
/usr/bin/pip
:sudo /usr/bin/pip
-
把原文件改为:
#!/usr/bin/python # GENERATED BY DEBIAN import sys from pip import __main__ if __name__ == '__main__': sys.exit(__main__._main())
参考链接:时光不写博客