No Module named 'requests'

Hi all, I am hoping for a little help. In Visual Studio I am running some code and am getting an error with import requests, when I run the code, it tells me no module named 'requests'. However, if I run the same code in Jupyter notebook it works fine. I have run pip install requests in my environment and it is already satisfied. Any ideas on why it would work in one notebook vs. the other?

Best Answer

  • milan.hedstrom
    Answer ✓

    0 Like Reply Share

    More...


    Initially I used pip install requests within VS. The request came back, all requirements satisfied. I restarted VS with a new terminal and tried pip install requests again. This time it installed requests and then everything worked fine.

Answers