I’m attempting to deploy a streamlit application on an AWS EC2 instance. Specifically, I am looking to create a dashboard for interacting with a few databases. When I run the app locally, it functions very well and exactly as I expect. However, when I run streamlit on the EC2 instance, it is unable to find certain packages that I certainly have installed. I get the following error:
ModuleNotFoundError: No module named 'boto3' Traceback: File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/streamlit/script_runner.py", line 332, in _run_script exec(code, module.__dict__) File "/home/ubuntu/projectfolder/interactive_dashboard.py", line 5, in <module> import somefile as sf File "/home/ubuntu/projectfolder/somefile.py", line 10, in <module> import boto3
(Apologies for the strange formatting, I’m not sure why it looks like that.)
I’ve looked through the various topics in the streamlit forums before asking and I noticed that multiple responses to similar questions mention a requirements.txt file. Is this necessary even when not using the streamlit sharing service? How can I ensure that streamlit searches in the correct path for the modules/requirements?
Thanks for your time!