安装imblearn时报错ImportError: cannot import name 'MultiOutputMixin'

安装imblearn时报错ImportError: cannot import name 'MultiOutputMixin'

解决方案:重启!重启!重启!

导入imblearn时的问题,本以为是pip install秒速能解决的事情,结果浪费了好几个小时都没成功,搜遍全网没找到解决方案。

1.先输入命令

conda install -c glemaitre imbalanced-learn

我:没成功

2.更新包

安装imblearn时报错ImportError: cannot import name 'MultiOutputMixin'

已有的都符合版本,缺的安装后

我:还是不行

3.本地已经有imblearn和imbalanced-learn了,还是import imblearn失败

安装imblearn时报错ImportError: cannot import name 'MultiOutputMixin'

4.又把所有包版本更新

能用的办法都用了,还是不行,好气哦

5.晚上八点半我还在和这个battle,开始看源码

安装imblearn时报错ImportError: cannot import name 'MultiOutputMixin'

明明有啊,想撞墙了!!!!

6.继续上网找,这个不解决样本均衡我怎么搞

继续搜,终于找到了一个看起来和我问题差不多的

安装imblearn时报错ImportError: cannot import name 'MultiOutputMixin'

https://*.com/questions/58207057/cant-import-multioutputmixin-in-linear-regression

重启完更想撞墙了,因为他们成功了。而我浪费了这么长时间,为啥之前没搜到呢。痛哭

安装imblearn时报错ImportError: cannot import name 'MultiOutputMixin'