Unable to import http.client

I have no clue what’s causing this. I am unable to import http.client, in Python 3.10.12 in Ubuntu Server 22.04. This is affecting everything on the server, for all users. I can’t even run pip now because pip relies on http.client
The only things that come up when googling are cases where someone has a file named http.py, but I don’t.
I have tried uninstalling and reinstalling python, to no avail.
I can import http, and that seems to work fine. But when I try to import http.client, I get a ModuleNotFoundError.

Any help or debugging assistance would be greatly appreciated.


For some reason /usr/lib/python3.10/http/client.py was missing. I copied it from a different computer, and it all seems to work now. I still don’t know what caused it or how to prevent it in the future.

Maybe a random disk glitch. I would not worry unless repeats.