ImportError: cannot import name main when running pip --version command in windows7 32 bit

后端 未结 16 1512
余生分开走
余生分开走 2020-11-28 01:28

I\'ve installed the latest python (2.7.9) bundled with pip and setuptools for windows 32-bit. I\'ve tried reinstalling pip but the problem persists.

Here\'s the erro

16条回答
  •  日久生厌
    2020-11-28 02:05

    The bug is found in pip 10.0.0.

    In linux you need to modify file: /usr/bin/pip from:

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

    to this:

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

提交回复
热议问题