Python 2 is deprecated and no longer maintained. It is recommended to transition to Python 3 for ongoing support and security updates.
When pip has been upgraded to version 21.1.2 it fails We can workaround this by uninstalling pip and resinstalling old version from yum package: Then upgrading pip with itself to a known-to-work ...