question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ModuleNotFoundError: No module named 'sklearn.utils.testing'

See original GitHub issue
  • Lazy Predict version: ‘0.2.7’
  • Python version: 3.8.0
  • Sklearn version : 0.21.3 / 0.23.1 / 0.24.1
  • Operating System: Windows 10

Description

I’m trying to Import LazyRegressor from lazypredict.Supervised

But while importing I’m getting an error " ModuleNotFoundError: No module named ‘sklearn.utils.testing’ ". I try it by installing Sklearn version: 0.21.3 / 0.23.1 / 0.24.1 but the same error is raised everytime ( I did all this in new env )

What I Did

import lazypredict
from lazypredict.Supervised import LazyRegressor

Output :
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-12-340b76a5a8e6> in <module>
      1 import lazypredict
----> 2 from lazypredict.Supervised import LazyRegressor

d:\ds env\python\lib\site-packages\lazypredict\Supervised.py in <module>
     14 from sklearn.preprocessing import StandardScaler, OneHotEncoder
     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

ModuleNotFoundError: No module named 'sklearn.utils.testing'

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:6
  • Comments:6

github_iconTop GitHub Comments

2reactions
am-officialcommented, Jul 13, 2021

Those who are facing ModuleNotFoundError: No module named ‘sklearn.utils.testing’

import sklearn
estimators = sklearn.utils.all_estimators(type_filter=None)
for name, class_ in estimators:
    if hasattr(class_, 'predict_proba'):
        print(name)

0reactions
naveen-marthalacommented, Jul 2, 2021

I have the same error and I am using sklearn 0.24.x.

user@name::~$ pip freeze | grep -i 'learn'
imbalanced-learn==0.7.0
scikit-learn==0.24.2
sklearn==0.0
umap-learn==0.5.1
user@name::~$ pip freeze | grep -i 'lazy'
lazypredict==0.2.9
Read more comments on GitHub >

github_iconTop Results From Across the Web

No module named 'sklearn.utils.testing' · Issue #285 ... - GitHub
Describe the bug from causalml import metrics causes ModuleNotFoundError: No module named 'sklearn.utils.testing' To Reproduce Steps to ...
Read more >
ModuleNotFoundError: No Module named 'sklearn.utils._testing'
For those facing the following error ModuleNotFoundError: No module named sklearn.utils.testing , an alternative solution to that of ...
Read more >
ModuleNotFoundError: No module named 'sklearn' in Python
The Python "ModuleNotFoundError: No module named 'sklearn'" occurs when we forget to install the scikit-learn module before importing it or install it in...
Read more >
Fix ModuleNotFoundError: No module named 'sklearn'
This error indicates that the scikit-learn (aka sklearn ) package was not installed, or even if it was installed for some reason it...
Read more >
ModuleNotFoundError: No module named 'sklearn.utils.testing ...
Debian Bug report logs - #1001020 python-anndata: FTBFS with sklearn 1.0.1-1: ModuleNotFoundError: No module named 'sklearn.utils.testing'.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found