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
Requirements.txt

Ok.
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: https://t-sopheak-condo-rental-price-web-app-main-dmyxls.streamlit.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.

requirements.txt
numpy

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:https://amresh-mishra-laptop-price-prediction-webapp-project-ynhkq4.streamlit.app/

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

@shankar4667

  • 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

requirements.txt

numpy
pandas
statsmodels
scikit-learn
Pillow
streamlit
1 Like