Error: ModuleNotFoundError: No module named 'joblib'

Github repository:
shilingt/cardiac-application (

Error message:
ModuleNotFoundError: No module named ‘joblib’


File "/home/vscode/.local/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/", line 600, in _run_script
    exec(code, module.__dict__)File "/workspaces/cardiac-application/", line 11, in <module>
    import joblib

I have added joblib in requirement.txt. Tried with joblib and joblib==1.4.0 and both module not found. please help.

Looks like you solved the issue?

unfortunately no. The error still persist despite I have added joblib to requirement.txt

i read some post mentioned about putting in the version. Tried that as well but also result module not found error.

Well, there is no model in your repo…

you were right. It was missed out. Have had it uploaded to github.
still seeing module not found error

import joblib
from joblib import load
from sklearn.preprocessing import LabelEncoder, StandardScaler

Load the trained model

risk_scaler = load(‘risk_scaler.pkl’)

I forked your app at ff4a468, I deployed it to streamlit cloud and joblib was succesfully imported.

You may need to reboot or redeploy the app.

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