I want to upgrade pip
$ pip install --upgrade pip
I get this failure output.
$ pip install --upgrade pip
Collecting pip
  Using cached https://files.pythonhosted.org/packages/da/f6/c83229dcc3635cdeb51874184241a9508ada15d8baa337a41093fab58011/pip-21.3.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-FErPSL/pip/setup.py", line 7
        def read(rel_path: str) -> str:
                         ^
    SyntaxError: invalid syntax
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-FErPSL/pip/
You are using pip version 8.1.2, however version 21.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
What needs to be done here? Upgrading/installing any package with pip also suggests that upgrade pip version... but upgrading fails due to this...
I have tried the following without success
$  sudo python3 -m pip install -U pip
$  sudo python3 -m pip install -U setuptools
Looks like I have two installations of python in /bin/python and /bin/python3
python --version Python 2.7.5
python3 --version Python 3.6.8