close

[Solved] ModuleNotFoundError: No module named ‘sklearn.externals.six’

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error ModuleNotFoundError: No module named ‘sklearn.externals.sixin Python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How ModuleNotFoundError: No module named ‘sklearn.externals.six’ Error Occurs?

Today I get the following error ModuleNotFoundError: No module named ‘sklearn.externals.sixin Python.

How To Solve ModuleNotFoundError: No module named ‘sklearn.externals.six’ Error ?

  1. How To Solve ModuleNotFoundError: No module named 'sklearn.externals.six' Error ?

    To Solve ModuleNotFoundError: No module named 'sklearn.externals.six' Error You can use something like. from six import StringIO

Solution 1

You can use something like below..

from six import StringIO

Solution 2

module sklearn.externals.six was removed in version 0.23. if you want to use this module, you have to downgrade to version 0.22 or lower.

Solution 3

You can use the official six package. First Install six using: pip install six and then you import the module. No need to downgrade scikit-learn.

Solution 4

Downgrade your scikit-learn version:

In jupyter notebook try !pip install --upgrade scikit-learn==0.20.3

or in terminal try pip install --upgrade scikit-learn==0.20.3

After that the code will recognize the sklearn.external.six module.

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also Read

Leave a Comment