No module named 'sklearn'

I have the same issue.But i have already added in my python code too.
ths is my github repository link–GitHub - ChinmayRaj/diabetes-prediction

The file name should be in lower case. It’s requirements.txt , not

Thanks for your advice

I have already uploaded diabetes dataset in github repository .
It is still showing ’ no such file or directory :‘/content/diabetes.csv’

Does the /content/ folder exist in your repo? If it doesn’t, you want to be reading in ‘diabetes.csv’, not /content/diabetes.csv.

Hi, Please, I am also having the same issue. I have gone through the earlier comments and have done all that has been stated earlier: added scikitlearn it in the requirements.txt and imported sklearn in my app file.
Please aid in looking into it, this is my git repo link-- GitHub - AtandaAbdul/Heart_Disease_Prediction: The app makes use machine learning algorithms to predict heart disease in patient based on certain feautures

I face the same problem.

Link to my web app:
Link to my GitHub repo: GitHub - T-Sopheak/Condo-rental-price-web-app: This app using streamlit allows us to predict condo monthly rental price in Phnom Penh.

The same solution should work for the same problem.

1 Like

But it doesn’t work. Could you help check it?

@T-Sopheak Several typos e.g.


Thanks a lot. It’s working now.

I am facing same error can anyone help
github link : GitHub - amresh-mishra/laptop_price_prediction_webapp

webapp link:

it is working in local machine

  1. Typo: requirements.txt
  2. Your requirements file ist crammed with unnecessary and non-installable packages, clean it up

@Franky1 done but still showing same error no module named sklearn

@Franky1 @snehankekre

I am also facing the Issue in deploying the model app , which is very basic version using sci-kit learn.
this github repo : GitHub - shankar4667/Simulation_Demo
i am trying to deploy

Can you help me on complete the deployment


  • what is the error message in the web console?
  • put all your import statements at the top of your python file and don’t re-import them further down
  • all you need in your requirements.txt see below, clean it up


1 Like