ModuleNotfound error

Traceback (most recent call last):
  File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 534, in _run_script
    exec(code, module.__dict__)
  File "/mount/src/heart_disease_prediction_app/heart_problem_prediciton_app.py", line 7, in <module>
    from sklearn.linear_model import LogisticRegression
ModuleNotFoundError: No module named 'sklearn'

Looks like you need to pip install -U scikit-learn!

2 Likes

Or add scikit-learn to requirements.txt if you are deploying to streamlit community cloud

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