Why did this error happen? Does this mean pip can't upgrade from 8.1.2?
$ pip install pip --upgrade
Collecting pip
Downloading https://files.pythonhosted.org/packages/33/c9/e2164122d365d8f823213a53970fa3005eb16218edcfc56ca24cb6deba2b/pip-22.0.4.tar.gz (2.1MB)
100% |████████████████████████████████| 2.1MB 285kB/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-rvCiCl/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-rvCiCl/pip/
You are using pip version 8.1.2, however version 22.0.4 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
I discount the comments that try to say your pip is 6 years old. It has to be able to upgrade its own package from version 8.1.2 to the stable one, right?
Edit:
OMG I feel like a rookie. My python version was 2.7. ok Throw the tomatoes at me now.
Im leaving this up as a lesson to me.