-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NOT ABLE TO RUN APP.PY #2
Comments
what is the python version you are using |
just import sklearn library or use anaconda environment so you don't get any error |
This error usually occurs when there is a mismatch between the versions of scikit-learn ( sklearn ) used during training and the version installed in your current environment. Here are a few steps you can take to resolve this problem: pip install --upgrade scikit-learn Check pickle file compatibility: Verify that the 'model.pkl' file was created using a compatible version of scikit-learn. If the file was created with an older version, there might be compatibility issues. In this case, you may need to retrain the model using the current scikit-learn version and save it again. Import the necessary modules explicitly: Instead of relying on the automatic import through the pickle file, you can explicitly import the required modules in your 'app.py' file. Add the following import statement before loading the pickled model: from sklearn import svm model = pickle.load(open('model.pkl', 'rb'), encoding='latin1') |
i am unable to run.please help |
model = pickle.load(open('model.pkl', 'rb'))
ModuleNotFoundError: No module named 'sklearn.svm.classes'
The text was updated successfully, but these errors were encountered: