macOS 10.14.6 preinstalled python 2.7.10, but it doesn't come with pip. It does have pip3 for python3.
bash-3.2$ python --version
Python 2.7.10
bash-3.2$ which pip
bash-3.2$ which pip2
bash-3.2$
I just want pip to be pip3 BUT not with alias because on other mac I found they are not alias.
~ ➤ which pip
/usr/local/bin/pip
~ ➤ which pip3
/usr/local/bin/pip3
~ ➤ ls -al /usr/local/bin/pip
-rwxr-xr-x 1 qiulang admin 235 Oct 8 17:58 /usr/local/bin/pip
~ ➤ ls -al /usr/local/bin/pip3
lrwxr-xr-x 1 qiulang admin 33 Oct 8 17:53 /usr/local/bin/pip3 -> ../Cellar/python/3.7.2_1/bin/pip3
~ ➤ pip --version
pip 19.2.3 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)
~ ➤ pip3 --version
pip 19.2.3 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)
This SO helps as well https://stackoverflow.com/questions/17271319/how-do-i-install-pip-on-macos-or-os-x
I finally find the easy way to let pip to be pip3 is just update it
lang@localhost % sudo pip3 install --upgrade pip
But then the preinstalled pip3 will be "obsolete":
lang@localhost % pip3 -V
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
pip 20.2.4 from /Library/Python/3.8/site-packages/pip (python 3.8)
lang@localhost % pip -V
pip 20.2.4 from /Library/Python/3.8/site-packages/pip (python 3.8)
This article https://techwithtech.com/python-pip-vs-pip3/ is quite good in explaining pip overall