'pip list command returns an empty string

I recently updated my python version from 3.9.6 to 3.10.2, and now I can not get pip to work properly. Specifically pip list and pip freeze as they do not output any of the modules that I imported. Example shown below.

pip not working

So far I have tried restarting my computer, trying in a virtual environment, running cmd prompt as admin, and trying it in Visual Studio Code. Not sure what to do next.

I did notice however that this is possibly a duplicate of this question, but no answer was provided on that post either.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source