I have, like many others before me, now encountered the “No module named matplotlib” error.
What I have done so far:
I have a requirements.txt with “matplotlib” in it.
There are no folders in my app (it’s just a toy project).
The repo is public.
https://datingtimeline.streamlit.app/
https://github.com/MaximOtt/DatingTimelineStreamlit/tree/main
Python: 3.11.2
Streamlit: 1.30.0
Error:
ModuleNotFoundError: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you’re on Streamlit Cloud, click on ‘Manage app’ in the lower right of your app).
Traceback:
File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 535, in _run_script
exec(code, module.__dict__)File "/mount/src/datingtimelinestreamlit/timeline.py", line 3, in <module>
import matplotlib.pyplot as plt # Plotting