How to change pip3 command to be pip?

前端 未结 9 2483
梦毁少年i
梦毁少年i 2020-12-04 23:33

I uninstalled pip, and I installed pip3 instead. Now, I want to use pip3 by typing pip only. The reason is I am used to t

9条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-04 23:49

    Rather than manually creating your own alias in bash and hoping this doesn't conflict with anything, most package managers should allow you to register the version you wish to use whilst maintaining dependencies.

    For instance on Linux:

    sudo update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1
    

    Or on Mac (MacPorts):

    port select --set pip pip3
    

提交回复
热议问题