I am using python2.7 and python3.5 on Ubuntu 16.04. After upgrading pip to v10 I am no longer able to install packages for python2.7 using pip.
How can I change pip to point to python2.7?
$ pip -V
pip 10.0.0 from /home/username/.local/lib/python3.5/site-packages/pip (python 3.5)
$ pip3 -V
pip 10.0.0 from /home/username/.local/lib/python3.5/site-packages/pip (python 3.5)
$ which python
/usr/bin/python
$ which python3
/usr/bin/python3
$ python -V
Python 2.7.12
$ python3 -V
Python 3.5.2
$ which pip
/usr/local/bin/pip
$ which pip3
/usr/local/bin/pip3
$ python3 -m pip install some_module
$ python -m pip install some_module
python/python3 -m pip install some_module
both installs to python 3.5.
Using Anaconda is not an option.