ModuleNotFoundError sklearn.neighbors

Hi there! My app ran well until I got this error message without editing my code:

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

Traceback:

File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 564, in _run_script
    exec(code, module.__dict__)File "/app/fifa_similar_players/st_fifa.py", line 3, in <module>
    from sklearn.neighbors import NearestNeighbors

Link to the app:
https://fifa-similar-players.streamlit.app/

Any ideas on how to fix this? Thank you!

On my local pc, doing a fresh ‘pip install sklearn’ and then running a script with this one line of Python currently produces the same error (no Streamlit or any other code):

import sklearn

requirements.txt needs:

scikit-learn

1 Like