ImportError: No module named 'sklearn.model_selection'
原因: sklearn库版本太低,升级为高版本
方法1:
cmd输入:
conda update scikit-learn
:
方法2:
方法1:update的速度超级慢
进行如下操作:
cmd输入1:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
cmd输入2:
onda config --set show_channel_urls yes
cmd输入3:
conda update scikit-learn
总结一下:
1、出现报错ImportError: No module named model_selection 的解决办法是升级 scikit-learn 的版本;
2、update官网在境外的库时,最好是找找看有没有国内的镜像源,比如清华大学的镜像源或者豆瓣、阿里云等等;
参考资料:
https://blog.csdn.net/jinlong_xu/article/details/72862047