I uninstalled Python without realizing it's really important. What should I do? [duplicate]

Solution 1:

To answer my real question, uninstalling Python entirely broke the desktop. I was not even able to open text-only mode. I'm not sure how it remained functional for a while; maybe everything was cached. It is not necessary to reinstall the OS.

Following the advice of Timo, I booted in recovery mode following instructions in this tutorial: RecoveryMode. I enabled networking before opening the root shell. I was not able to get online over wifi; I had to use ethernet. Then I ran

sudo apt-get install ubuntu-desktop
sudo reboot

Now my desktop is fixed!