shankarpandala / lazypredict

Lazy Predict help build a lot of basic models without much code and helps understand which models works better without any parameter tuning
MIT License
2.78k stars 321 forks source link

ImportError: cannot import name '_raise_dep_warning_if_not_pytest' from 'sklearn.utils.deprecation' Anaconda3\lib\site-packages\sklearn\utils\deprecation.py) #343

Open jolio007 opened 3 years ago

jolio007 commented 3 years ago

Describe the bug I haven't got anything complex... the same code as the tutorial

from lazypredict.Supervised import LazyClassifier, LazyRegressor
from sklearn.model_selection import train_test_split

clf = LazyClassifier(predictions=True)
models, predictions = clf.fit(X_train, x_test, Y_train, y_test)

I'm getting this error message. Could be my config. Please help

ImportError                               Traceback (most recent call last)
<ipython-input-9-f370d18ec53e> in <module>
----> 1 from lazypredict.Supervised import LazyClassifier, LazyRegressor
      2 from sklearn.model_selection import train_test_split
      3 
      4 clf = LazyClassifier(predictions=True)
      5 models, predictions = clf.fit(X_train, x_test, Y_train, y_test)

~\AppData\Roaming\Python\Python38\site-packages\lazypredict\Supervised.py in <module>
     14 from sklearn.preprocessing import StandardScaler, OneHotEncoder, OrdinalEncoder
     15 from sklearn.compose import ColumnTransformer
---> 16 from sklearn.utils.testing import all_estimators
     17 from sklearn.base import RegressorMixin
     18 from sklearn.base import ClassifierMixin

~\Anaconda3\lib\site-packages\sklearn\utils\testing.py in <module>
      5 from . import _testing  # type: ignore
      6 from ..externals._pep562 import Pep562
----> 7 from ..utils.deprecation import _raise_dep_warning_if_not_pytest
      8 
      9 deprecated_path = 'sklearn.utils.testing'

ImportError: cannot import name '_raise_dep_warning_if_not_pytest' from 'sklearn.utils.deprecation' (C:\Users\Anaconda3\lib\site-packages\sklearn\utils\deprecation.py)

Python version : 3.7.4 pip check lazypredict instapy 0.6.10 has requirement jsonschema<3,>=2.6.0, but you have jsonschema 3.2.0. clarifai 2.6.2 has requirement configparser<4,>=3.5, but you have configparser 5.0.0. clarifai 2.6.2 has requirement jsonschema<3,>=2.5, but you have jsonschema 3.2.0.

Buckeyes2019 commented 3 years ago

I have been getting the same error. I think LazyPredict does not support the most recent version of Scikit-Learn (0.24.2).

lokijota commented 2 years ago

Same error here. LazyPredict has a few dependencies on older versions of packages (eg, pandas 1.05, etc.). And looking at the date of the un-responded issue, suspect it's not being maintained.