How to change pip3 command to be pip?

前端 未结 9 2490
梦毁少年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:55

    I believe one shouldn't do such a thing. Actually I would argue it's even better to not use the pip, pip3, etc. scripts ever. Instead one should always prefer the more explicit and surefire way of using pip's executable module for one specific Python interpreter:

    path/to/pythonX.Y -m pip somecommand
    

    References:

    • https://snarky.ca/why-you-should-use-python-m-pip/
    • https://snarky.ca/a-quick-and-dirty-guide-on-how-to-install-packages-for-python/

提交回复
热议问题