美文网首页
Traceback (most recent call last

Traceback (most recent call last

作者: DS事务所 | 来源:发表于2019-09-29 11:11 被阅读0次
    pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U
    pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
    

    python3设置默认源时报错

    Traceback (most recent call last):
      File "/usr/bin/pip3", line 9, in <module>
        from pip import main
    ImportError: cannot import name 'main'
    

    输入命令

    sudo vi /usr/bin/pip3
    

    from pip import main
    if __name__ == '__main__':
        sys.exit(main())
    

    改为

    from pip import __main__
    if __name__ == '__main__':
        sys.exit(__main__._main())
    

    相关文章

      网友评论

          本文标题:Traceback (most recent call last

          本文链接:https://www.haomeiwen.com/subject/cjhfpctx.html