Upgrading pip fails with syntax error caused by sys.stderr.write(f"ERROR: {exc}")

On a fresh Vagrant VM using box bento/centos-7 the following commands corrupt my pip installation: yum update yum install epel-release -y yum install python-pip -y /usr/bin/pip2 install --upgrade pip