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

1 Like

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

1 Like

Ok.
Thanks for your advice

1 Like

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

1 Like

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

1 Like

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

1 Like

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.

1 Like

The same solution should work for the same problem.

2 Likes

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

1 Like

@T-Sopheak Several typos e.g.

requirements.txt
numpy
1 Like

Thanks a lot. It’s working now.

1 Like

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 Like
  1. Typo: requirements.txt
  2. Your requirements file ist crammed with unnecessary and non-installable packages, clean it up
1 Like

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

1 Like

@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

1 Like

@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
2 Likes

Hi, I have updated requirements.txt and app.py as per your earlier suggestion still am getting the error: “ModuleNotFoundError: No module named ‘sklearn’”.

My Github file location is: GitHub - RAJUPRADHAN/ML_DEPLOY_STREAMLIT_DIABETES: Deploying Machine Learning Web App using Streamlit on diabetes data

Please help

1 Like

Typo: requeriments.txt

2 Likes

A post was split to a new topic: ModuleNotFoundError: No module named ‘sklearn’

I’m having the same issue. I’m getting this error: ModuleNotFoundError: No module named ‘sklearn’
I don’t think I have any typos, and I have “scikit-learn” in my requirements.txt and “import sklearn” in my code

Github Repository: GitHub - ElaineJ123/hobbies
Streamlit page: https://hobbies-2023.streamlit.app/

1 Like