python – How to make Anaconda pip as the default pip

My Python 3 pip is messing up. Apparently I have a non-conda pip as the default pip but conda python is my default python (as below), which is messing up with package installations:

>which -a pip
/home/<user>/.local/bin/pip   
/home/<user>/.conda/envs/newenv/bin/pip
/usr/bin/pip

>which -a python
/home/<user>/.conda/envs/newenv/bin/python
/usr/bin/python

Looks like to address this issue, instead of just calling pip install <package>, I should use python -m pip install <package>.

Now the question is, is there any ways to make conda pip the default pip? So to avoid writing python -m pip install and directly use pip to call it.

Read more here: Source link