问题:
from sklearn.model_selection import KFold
ImportError: No module named model_selection
原因:通过如下命令查看sklearn的版本: ’0.17’,sklearn.model_selection是sklearn版本‘0.18.1’以上的,
解决:
pip install -U scikit-learn
若遇到:
Cannot uninstall ''. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
问题解析:
旧版本依赖多,不能清晰的删除,此时应该忽略旧版本升级,即如下
解决办法:sudo pip install nibabel --ignore-installed scikit-learn