An easier way to undo the changes is to ssh to the broken machines IP and log in. You can then run the commands to undo the changes back to the python version you want.