No module named ‘sklearn.datasets.samples_ generator’
Causes and solutions of error reporting
Problem reporting error
from sklearn.datasets.samples_generator import make_blobs
reason
samples_ The generator
module has been removed in the new version of scikit learn
.
samples_ The corresponding classes/functions in the generator
module can be imported directly from sklearn. Datasets
.
resolvent
Method 1:
Import make directly from
sklearn. Datasets
_ blobs
from sklearn.datasets import make_blobs
Method 2:
Version problem, reduce version
pip install scikit-learn==0.22.1
Reference: link
come on mark>
thank you mark>
work hard mark>
Read More:
- No module named sklearn.neighbors_ typedefs
- ModuleNotFoundError: No module named ‘numpy.testing.nosetester‘
- [Solved] ModuleNotFoundError: No module named ‘win32api’
- ModuleNotFoundError: No module named ‘tensorflow_core.estimator‘
- ModuleNotFoundError: No module named xxx
- ModuleNotFoundError: No module named ‘MySQLdb‘
- Modulenotfounderror: no module named ‘CV2’ – (version problem)
- ModuleNotFoundError: No module named ‘notebook‘
- ModuleNotFoundError: No module named ‘apt_pkg‘
- ModuleNotFoundError: No module named ‘ahocorasick‘ [100% Work Method]
- Jenkins reported an error modulenotfounderror: no module named filename solution
- ModuleNotFoundError: No module named ‘mmcv._ext
- ModuleNotFoundError: No module named ‘tensorboardX‘
- Mmdet error modulenotfounderror: no module named ‘mmcv_ ext‘
- Sklearn.datasets.base import error [How to Solve]
- Error importing keras in jupyter Notebook: modulenotfounderror: no module named ‘keras’ solution
- Tensorflow operation report error modulenotfounderror: no module named ‘tensorflow. Python. Types’ solution
- Installing sklearn (scikit learn) module related to Python machine learning in Windows
- How to Fix Sklearn ValueError: This solver needs samples of at least 2 classes in the data, but the data
- About the problem of calling tools library by running Python program under Mac OS X, modulenotfoundererror: no module named ‘tools‘