0

I did pip freeze, and found requests, therefore I have requests, but I am getting an error saying

ModuleNotFoundError: No module named 'requests'

I just installed Python 3.9.2, and Python 3.8 is still on my computer. (Stating this in case it's a contributing factor to my problem.)

Please help!

  • Does this answer your question? [Dealing with multiple Python versions and PIP?](https://stackoverflow.com/questions/2812520/dealing-with-multiple-python-versions-and-pip) – Gino Mempin Feb 24 '21 at 09:23

1 Answers1

0

Are you sure requests was installed in the correct python install, you can do python3.9 -mpip list | grep requests to check if requests is installed for python3.9, if it doesn't show up you can use python3.9 -mpip install requests to install it. (the error might be the pip command is the wrong python instances pip command)

PotentialStyx
  • 424
  • 4
  • 11
  • Also, if you're using `pip install` on most systems that installs packages for python2 where you would need to using `pip3 install` to install packages for python3. – Hayden Feb 24 '21 at 05:06
  • 1
    @Hayden I would think even better than that would be todo: `python -mpip` (for example: `python3.9 -mpip`), so you can control the exact version pip installs for – PotentialStyx Feb 24 '21 at 05:09