No module named ‘sklearn.datasets.samples_generator’

We Are Going To Discuss About No module named ‘sklearn.datasets.samples_generator’. So lets Start this Python Article.

No module named ‘sklearn.datasets.samples_generator’

  1. How to solve No module named 'sklearn.datasets.samples_generator'

    In the latest versions of scikit-learn, there is no module sklearn.datasets.samples_generator – it has been replaced with sklearn.datasets (see the docs); so, according to the make_blobs documentation, your import should simply be:
    from sklearn.datasets import make_blobs
    As a general rule, the official documentation is your best friend, and you should definitely consult it first before anything else.

  2. No module named 'sklearn.datasets.samples_generator'

    In the latest versions of scikit-learn, there is no module sklearn.datasets.samples_generator – it has been replaced with sklearn.datasets (see the docs); so, according to the make_blobs documentation, your import should simply be:
    from sklearn.datasets import make_blobs
    As a general rule, the official documentation is your best friend, and you should definitely consult it first before anything else.

Solution 1

In the latest versions of scikit-learn, there is no module sklearn.datasets.samples_generator – it has been replaced with sklearn.datasets (see the docs); so, according to the make_blobs documentation, your import should simply be:

from sklearn.datasets import make_blobs

As a general rule, the official documentation is your best friend, and you should definitely consult it first before anything else.

Original Author desertnaut Of This Content

Solution 2

Try using pip3

pip3 install -U scikit-learn

Original Author Ajanyan Pradeep Of This Content

Conclusion

So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.

Also Read,

ittutorial team

I am an Information Technology Engineer. I have Completed my MCA And I have 4 Year Plus Experience, I am a web developer with knowledge of multiple back-end platforms Like PHP, Node.js, Python and frontend JavaScript frameworks Like Angular, React, and Vue.

Leave a Comment