ModuleNotFoundError: No module named 'requests'

after i installed the streamlit, i try to run the commandstreamlit hello. Bellow is what happened, i have tried to install the requests package by pip install requests, but it still didn’t work. Could anyone tell me what should i do?

My guess:

  1. You’re using the streamlit that is in your conda env called pytorch (just based on your screenshot)
  2. You’re using pip from somewhere else

You can see if that’s correct by running:
which streamlit
which pip

Essentially you need to make sure you’re using the same environment for both, which you should be able to do by explicitly activating your conda environment (conda activate pytorch) and then pip installing from there.

1 Like