pip won't run. throws errors instead

Solution 1:

Seems to be a bug that it is reported here

It should work if you install a later version of pip.

You can remove the current pip installation with:

sudo apt-get purge python-pip

Then install it from github(it is a later version):

wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py
python get-pip.py

Edit
If it still won't work try this as it says so in the installation documentation(after you installed the new version):

To enable the use of pip from the command line, ensure the Scripts subdirectory of your Python installation is available on the system PATH. (This is not done automatically.)

References:

  1. https://pip.pypa.io/en/latest/installing.html
  2. https://bugs.launchpad.net/ubuntu/+source/python-pip/+bug/1306991

Solution 2:

This problem is caused by a mismatch between your pip installation and your requests installation. First remove the python-pip package and then install the latest version of pip. Open the terminal and type:

sudo apt remove python-pip
sudo apt install python-setuptools
sudo easy_install -U pip

To update pip for Python 3.x replace python-pip with python3-pip, replace python-setuptools with python3-setuptools, and replace easy_install with easy_install3.

Solution 3:

Well, the get-pip.py script from github is outdated, and the latest version is on pypa as follows:

sudo apt-get purge python-pip

wget https://bootstrap.pypa.io/get-pip.py

python get-pip.py