2020
10-08
10-08
python中导入 train_test_split提示错误的解决
如下所示:原因:在python3.6中sklearn已弃用train_test_split,导致导入报错解决方式,用model_selection模块导入:fromsklearn.model_selectionimporttrain_test_split经测试,在python2中也是使用该方式导入train_test_split模块补充知识:fromsklearn.model_selectionimporttrain_test_split找不到模块解决方案:pipuninstallnumpypipinstallnumpy==1.16(或pipinstallnumpy==1.14.5)如果提示权限不够,‘[WinErr...
继续阅读 >