Try to uninstall Python, delete the remaining program files, and then install it again fresh.
It worked for me. This error happened to me when I migrated to a new laptop and used a migration software to move my software from the old laptop to the new one. And yeah, it didn't work quite well.