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

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

问题


72440c25726446b09d115ecc57759129.png

方法一



sklearn 0.23版本已经删掉了这个sklearn.externals.six,直接从six中引入StringIO即可

from six import StringIO

1c12b9c005124d22a170db0a19dbff14.png


方法二



出错原因:skleran在0.22版本之后,没有six模块了

解决方法:

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

b5758d94801a44c192ae686fb36b231a.png


相关文章
|
6月前
|
Linux iOS开发 索引
【已解决】ModuleNotFoundError: No module named ‘matplotlib‘
【已解决】ModuleNotFoundError: No module named ‘matplotlib‘
|
6月前
|
Linux iOS开发 MacOS
【已解决】ModuleNotFoundError: No module named ‘IPython‘
【已解决】ModuleNotFoundError: No module named ‘IPython‘
|
6月前
|
Linux iOS开发 MacOS
[已解决]ModuleNotFoundError: No module named ‘tqdm‘
[已解决]ModuleNotFoundError: No module named ‘tqdm‘
|
12月前
Py3 ModuleNotFoundError: No module named ‘Crypto‘;ModuleNotFoundError: No module named Cryptodome‘
Py3 ModuleNotFoundError: No module named ‘Crypto‘;ModuleNotFoundError: No module named Cryptodome‘
99 0
|
6月前
|
Linux PyTorch 算法框架/工具
[已解决]ModuleNotFoundError: No module named ‘einops‘
[已解决]ModuleNotFoundError: No module named ‘einops‘
|
6月前
|
Python
ModuleNotFoundError: No module named ‘IPython‘
ModuleNotFoundError: No module named ‘IPython‘
138 0
ModuleNotFoundError: No module named ‘sentencepiece‘
ModuleNotFoundError: No module named ‘sentencepiece‘
246 0
ModuleNotFoundError: No module named 'torchstat'
ModuleNotFoundError: No module named 'torchstat'
458 0
ModuleNotFoundError: No module named 'torchstat'
|
Python
ModuleNotFoundError: No module named ‘pyexpat‘
ModuleNotFoundError: No module named ‘pyexpat‘
221 0