People keep misunderstanding this, so just to clarify: pip still works on Python 2! They just aren't doing any new releases for Python 2.
$ virtualenv --python=python2.7 /tmp/venv
$ /tmp/venv/bin/pip install --upgrade pip
...
Successfully installed pip-20.3.4
$ /tmp/venv/bin/pip install flask
...
Collecting flask
Using cached Flask-1.1.2-py2.py3-none-any.whl (94 kB)
...
The mechanism, as used by other projects as well, is that when you upload a project to PyPI you can set a minimal required version of Python. So when you upgrade, you get the latest version that supports the current version of Python.Sometimes maintainers screw this up, but so long as the maintainers do this everything Just Works: people on old Python get old packages, people on new Python get new packages.