Streamlit deployment errors out with no module found error

Welcome to the Streamlit community, and thanks for sharing your error log and repo! :tada: The error ModuleNotFoundError: No module named ‘sklearn’ means your app is trying to use scikit-learn, but it’s not installed in the deployment environment. This usually happens if scikit-learn isn’t listed in your requirements.txt file, or if the file is misnamed or misplaced.

To fix this, add scikit-learn (not sklearn) to your requirements.txt file, save, commit, and push to GitHub. Then redeploy or reboot your app. For more details, see the official docs and community solutions: ModuleNotFoundError No module named - Streamlit Docs, App dependencies - Streamlit Docs, and FAQ: ModuleNotFoundError.

Sources: