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
Copy the pip3 file and rename as pip:
sudo cp /usr/bin/pip3 /usr/bin/pip
pip --version
and
pip3 --version
Works now.
you can either add alias to your ~/.bashrc
alias pip=pip3
or add to your $PATH symlink named pip pointing to pip3 binary
(btw, this even though concerning pip isn't really python related question, so you should retag it)
Update: July 2020
If there is no ~/.bashrc in your home directory on macOS, inputting
alias pip=pip3
in your ~/.zprofile file has the same effect,
Since you uninstalled pip
, this solution assumes you're only going to use pip3
.
Open your terminal.
Create a simple link. To do that type:
sudo ln -s /usr/bin/pip3 /usr/bin/pip
Now when you type pip
, it will invoke pip3
.
Check that it worked by typing pip --version
pip --version
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)
You're all set!