0

I installed "request" but I can not import it in my Python. I dont know why?

CMD:

pip install requests

Python:

import requests

enter image description here

Error:

ModuleNotFoundError: No module named 'requests'

enter image description here

  • 1
    can you check your virtual environments? my first guess is the venv you installed the package is not the venv you are trying to run the project – engin_ipek Oct 25 '20 at 10:47
  • 1
    It also could be that you did `pip install` in a Python 2 environment but running the script in Python 3. – Samkit Jain Oct 25 '20 at 10:51
  • There are too many unknowns. The linked duplicates cover the general cases. You'll have to be a lot more specific to get more specific help. – Andras Deak -- Слава Україні Oct 25 '20 at 10:53
  • @engin_ipek so you mean I need to check that I installed "requests" to the PATH environment variable? –  Oct 25 '20 at 10:57
  • and for the record I have Python 3 :) –  Oct 25 '20 at 10:58
  • 1
    I fixed that guys, thank you! I have installed requests but it was not in my Python/Scripts . So I installed "requests" in there –  Oct 25 '20 at 14:29

0 Answers0