I originally installed Python on drive D. At some point I manually moved everything from drive D to C so that I can delete the partition for drive D (in retrospect, bad idea). Now I am unable to uninstall Python since the installation still thinks it's located on drive D.
Is there anyway to tell Python it's installed on drive C now? Or maybe a way to force the uninstallation?
You do not have to change all values in the registry manually. There are a number of ways to trick the installer to clean up the registry for you. One of them is to plug in an USB storage drive and make it mount under "D:". You can manipulate drive letters in Control panel under computer management, which is found in Administrative Tools, which can be found in different places according to your Windows version. Administrative Tools may also be available through the start menu.
You mount something, a network drive, or USB drive or virtual drive or whatever under "D:", you copy-paste your Python folder you manually moved before there, under the same name you used before, and you start the installer/uninstaller. After uninstall, your registry is clean, and your Python on "C:" and your old folder name, free. If you already removed the copy on "C:", run the Python installer, point it to "D:" and when it asks whether you want to overwrite the existing Python, just do it. After installation, uninstall it.
Note: If you installed some libraries including binaries that have to add something to the registry, like pywintypes, go to your Python's directory (in one you installed the library under, if you installed them before moving, then in the newly created folder, otherwise on the drive "C:"), there you will find individual uninstallers for each of them. E.g. Removepywin32.exe, Removepy2exe.exe, Removetwain.exe ... You will find practically an uninstaller for each lib you installed using a binary installer instead of pip or manual installation. Most of them do not have to be run in order to clean up the registry, but some do. The Python uninstaller should be able to run them automatically, but what is safe is safe.
This way of uninstall I know will work without trying it first, so that's what I wrote. It is a bit of work, but well, you shouldn't have moved Python so forcefully before. What you do when you want to do it is, make a backup of Python's folder (copy-paste somewhere else), then uninstall it. Then install the fresh version wherever you want (same version as the one you removed), then overwrite the fresh installed folder with your old one. If you have libraries installed that need registry entries you have to reinstall them in order for them to work properly. But essentially this is the procedure that always works.