How to change pip3 command to be pip?

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.

If there is no ~/.bashrc in your home directory on macOS, inputting

alias pip=pip3

in your ~/.zprofile file has the same effect.


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

Tags:

Pip