I had this issue but all of the previous solutions in this question did not work. I found that on Windows 11 doing a custom Python install the PYTHONPATH env variable had not been set. Creating and setting up the PYTHONPATH variable, and then restarting terminals fixed the same issue for me.