0

Another very basic question. I'm trying to follow along a tutorial that shows the use of psutil. However, when I type "import psutil", it says "ModuleNotFoundError: No module named 'psutil'". Right before this example, the example was "import shutil", which I executed just fine. What's the issue here?

Thanks in advance.

What I tried:

I checked that the pip is installed in the correct python folder and that the interpreter is set to the correct python version. I made sure there are no other python versions as well.

Also tried going to the command prompt and typing in "python -m pip install --upgrade pip" and other things in this page: Visual studio says psutil module not found even though it's installed. But that just returns "Python". Typing in "py -m pip install --upgrade pip" says "Requirement already satisfied". I would appreciate it if someone could also explain why my computer returns "Python" when I refer to Python as python but understands what I want when I refer to Python as "py".

SOS
  • 13
  • 3

1 Answers1

0

I solved this buy uninstalling and reinstalling pip. Then, I went to https://www.lfd.uci.edu/~gohlke/pythonlibs/#psutil and downloaded psutil‑5.9.0‑cp311‑cp311‑win_amd64.whl and ran it.

SOS
  • 13
  • 3