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


相关文章
|
7月前
|
Linux iOS开发 索引
【已解决】ModuleNotFoundError: No module named ‘matplotlib‘
【已解决】ModuleNotFoundError: No module named ‘matplotlib‘
|
4月前
|
人工智能 语音技术
ModuleNotFoundError: AutomaticSpeechRecognitionPipeline: No module named ‘funasr‘
这篇文章描述了在运行阿里语音AI模型的语音识别时遇到的`ModuleNotFoundError: No module named ‘funasr’`错误,并提供了通过`pip install funasr --upgrade -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html`命令重新安装funasr模块的解决方法。
ModuleNotFoundError: AutomaticSpeechRecognitionPipeline: No module named ‘funasr‘
|
7月前
|
Linux iOS开发 MacOS
【已解决】ModuleNotFoundError: No module named ‘IPython‘
【已解决】ModuleNotFoundError: No module named ‘IPython‘
|
7月前
|
Linux iOS开发 MacOS
[已解决]ModuleNotFoundError: No module named ‘tqdm‘
[已解决]ModuleNotFoundError: No module named ‘tqdm‘
Py3 ModuleNotFoundError: No module named ‘Crypto‘;ModuleNotFoundError: No module named Cryptodome‘
Py3 ModuleNotFoundError: No module named ‘Crypto‘;ModuleNotFoundError: No module named Cryptodome‘
103 0
|
7月前
|
Linux PyTorch 算法框架/工具
[已解决]ModuleNotFoundError: No module named ‘einops‘
[已解决]ModuleNotFoundError: No module named ‘einops‘
|
7月前
|
Python
ModuleNotFoundError: No module named ‘IPython‘
ModuleNotFoundError: No module named ‘IPython‘
191 0
ModuleNotFoundError: No module named ‘sentencepiece‘
ModuleNotFoundError: No module named ‘sentencepiece‘
269 0
ModuleNotFoundError: No module named 'torchstat'
ModuleNotFoundError: No module named 'torchstat'
493 0
ModuleNotFoundError: No module named 'torchstat'

热门文章

最新文章