ModuleNotFoundError: No module named ‘sklearn.externals.six‘

Article directory

question

insert image description here

method one

sklearn 0.23 version has deleted this sklearn.externals.six, you can directly introduce StringIO from six

from six import StringIO

insert image description here

Method Two

The reason for the error: After skleran version 0.22, there is no six module

Solution:

!pip install --upgrade scikit-learn==0.20.3
!pip install six

insert image description here

Guess you like

Origin blog.csdn.net/wxfighting/article/details/124226297