Getting this error when upgrading pip. It seems to be a syntax error from the message...
Khurum@Cuckoo-Sandbox:~$ sudo pip install --upgrade pip
The directory '/home/Khurum/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/Khurum/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting pip
Downloading https://files.pythonhosted.org/packages/88/d9/761f0b1e0551a3559afe4d34bd9bf68fc8de3292363b3775dda39b62ce84/pip-22.0.3.tar.gz (2.1MB)
100% |████████████████████████████████| 2.1MB 559kB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-F1TTxe/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-F1TTxe/pip/
You are using pip version 8.1.1, however version 22.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.