No module named 'sklearn'

ModuleNotFoundError: No module named ‘sklearn’

Traceback:

File "/usr/local/lib/python3.7/site-packages/streamlit/script_runner.py", line 332, in _run_script
    exec(code, module.__dict__)

File “/app/ml_deploy_using_streamlit/app.py”, line 7, in
classifier = pickle.load(pickle_in)

You haven’t installed sklearn on your workspace…you can use pip for that

You cal also refer to macos - ImportError: No module named sklearn (Python) - Stack Overflow

1 Like

No i did…and it was even present in the Requriment.txt file

Hey @Pratap517!

Thanks for popping your question on our forum! Can you post the link to your github repo that your deploying your Sharing app from? I can then checkout your requirements file see if there’s anything funny happening!

also, this post might be helpful:

Cheers,
Marisa