How to change pip3 command to be pip? Ask Question

How to change pip3 command to be pip? Ask Question

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 type pip only and every guide uses the pip command, so every time I want to copy and paste commands, I have to modify pip to pip3 which wastes time. When I type pip I have an error which is pip: command not found which means pip command is not taken. Is it possible to make pip points to pip3?

ベストアンサー1

You can use pip3 using the alias pip by adding alias to your .bashrc file.

alias pip=pip3

or by adding a symlink named pip to your $PATH, which points to the pip3 binary.

macOSのホームディレクトリに~/.bashrcがない場合は、次のように入力します。

alias pip=pip3

~/.zprofile ファイルでも同じ効果があります。

おすすめ記事