ModuleNotFoundError: This app has encountered an error ModuleNotFoundError: No module named 'sklearn'

Greetings everyone!
I’m seeking assistance with a problem I’m encountering. My application performed well on localhost, but when attempting to use Streamlit cloud today, I encountered an issue.

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).



You need to add scikit-learn to your requirements.txt file.

thanks a lot!!!

1 Like

I got the same error, I’ve already made a requirements.txt file on my repo. Any solutions?

Once scale down the python version to 3.9 in advanced settings of your app in streamlit cloud dashboard