Unable to install app in streamlit cloud

Please share the full error message. You can get it by clicking manage app in the lower, right corner to view the terminal. From the part that I can see, I am guessing you need to correct your requirements.txt file.

Anything besides Streamlit that you would need to pip install to make your app run needs to be listed in a requirements.txt file beside your main_app.py file. After you make any changes to your requirements.txt file, I recommend doing a manual reboot of your app to avoid carryover of issues.

Below with error from streamlit:

Collecting usage statistics. To deactivate, set browser.gatherUsageStats to False.
2023-01-21 01:13:03.282 Uncaught app exception
Traceback (most recent call last):
File “/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py”, line 565, in _run_script
exec(code, module.dict)
File “/app/binary-classification/app.py”, line 3, in
import utils
File “/app/binary-classification/utils.py”, line 4, in
import sklearn
ModuleNotFoundError: No module named ‘sklearn’

You need to tell Streamlit Cloud all the things it needs to pip install to run your app. You need a requirements.txt file that has all those packages listed. Scikit-Learn is not a built-in library; it needs to be installed.

In particular, you must have scikit-learn as one of the things in your requirements file.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.