ModuleNotFoundError: No module named 'matplotlib' despite putting in requirement.txt

Keep getting the ModuleNotFoundError: No module named ‘matplotlib’ despite putting matplotlib in my requirements.txt file. I’ve tried different matplotlib and streamlit versions in the requirements.txt file but none have worked

Hi @Dapo_Adegbile :wave:

Here are a few things you can check:

  • Have you included matplotlib in the requirements.txt file?
  • Have you named the requirements.txt file properly?
  • Have you saved the requirements.txt file and uploaded it to the root folder of your GitHub repo?


hey hi ! welcome to community it will be awesome if you can share source code or link to your issue describing more details
for now check out
Make sure ‘matplotlib’ is correctly spelled in requirements.txt, run pip install -r requirements.txt, check Python version, activate the virtual environment if used, ensure no typos in code, and consider rebuilding the GitHub Codespace if applicable.