When trying to use python3.5 in a virtual environment, I find some f-strings in pip's scripts, preventing me from installing anything through pip as f-strings were introduced in python3.6. I've run this in a number of configurations, but this is the simplest snippet that shows the problem:
user@machine:/path/to/project$ virtualenv -p $(which python3.5) ./venv
Running virtualenv with interpreter /usr/bin/python3.5
Using base prefix '/usr'
New python executable in /path/to/project/venv/bin/python3.5
Also creating executable in /path/to/project/venv/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.
(venv) user@machine:/path/to/project$ which pip
/path/to/project/venv/bin/pip
(venv) user@machine:/path/to/project$ pip -V
Traceback (most recent call last):
File "/path/to/project/venv/bin/pip", line 7, in <module>
from pip._internal.cli.main import main
File "/path/to/project/venv/lib/python3.5/site-packages/pip/_internal/cli/main.py", line 60
sys.stderr.write(f"ERROR: {exc}")
^
SyntaxError: invalid syntax
If I fix this specific syntax error, I get another error based on f-strings
How do a get a virtual environment for python3.5 with a working version of pip?
I know that python3.5 is reaching EoL, but it seems that python is just getting harder for me to use in general. Old projects are breaking because I can't use these old versions of python. So I'd like some insight on how to avoid errors like these in the future. Is the answer just to port these projects forward? Honestly, that's just a lot of work and it seems like old versions of python should just stay working. Maybe that's too much to ask and it's difficult to maintain these older versions of python?