How to override the pip command to Python3.x instead of Python2.7?

后端 未结 7 1177
伪装坚强ぢ
伪装坚强ぢ 2020-12-02 20:07

I am using OSX and I have pip installed for both Python3.5 and Python2.7. I know I can run the command pip2 to use Python2 and when I use the command pip3

7条回答
  •  攒了一身酷
    2020-12-02 20:24

    It works for me:

    As super-user

    Uninstall pip

    sudo pip uninstall pip
    

    Install pip

    sudo python3 -m pip install --upgrade --force pip
    

    Check install path

    sudo pip -V
    

    As local-user

    Uninstall pip

    pip uninstall pip
    

    Install pip

    python3 -m pip install --upgrade --force pip
    

    Check install path

    pip -V
    

提交回复
热议问题