How to make pip point to python 2 instead of python 3 (as it normally should be)?
I want to install a package that is compatible only with python 2 and I use the pip command but it installs the package for python 3.
[root@q~]# python -V
Python 2.7.5
[root@q~]# python3 -V
Python 3.4.9
[root@q~]# pip -V
pip 19.0.1 from /usr/lib/python3.4/site-packages/pip (python 3.4)
[root@q~]# pip3 -V
pip 19.0.1 from /usr/lib/python3.4/site-packages/pip (python 3.4)
[root@q~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
[root@q~]# whereis python
python: /usr/bin/python2.7 /usr/bin/python /usr/bin/python3.4 /usr/bin/python3.4m /usr/bin/python3.4-config /usr/bin/python3.4m-config /usr/bin/python3.4m-x86_64-config /usr/lib/python2.7 /usr/lib/python3.4 /usr/lib64/python2.7 /usr/lib64/python3.4 /etc/python /usr/include/python2.7 /usr/include/python3.4m /opt/borg-env/bin/python /opt/borg-env/bin/python3.4 /usr/share/man/man1/python.1.gz
[root@q~]# whereis python3
python3: /usr/bin/python3 /usr/bin/python3.4 /usr/bin/python3.4m /usr/bin/python3.4-config /usr/bin/python3.4m-config /usr/bin/python3.4m-x86_64-config /usr/lib/python3.4 /usr/lib64/python3.4 /usr/include/python3.4m /opt/borg-env/bin/python3 /opt/borg-env/bin/python3.4 /usr/share/man/man1/python3.1.gz
[root@q~]# whereis pip
pip: /usr/bin/pip /usr/bin/pip3.4 /opt/borg-env/bin/pip /opt/borg-env/bin/pip3.4
[root@q~]# whereis pip3
pip3: /usr/bin/pip3 /usr/bin/pip3.4 /opt/borg-env/bin/pip3 /opt/borg-env/bin/pip3.4