OS 3.5.1.3上的Python 3.5.1 | Anaconda 4.0.0(x86_64)
>>> from sklearn import pipeline,model_selection
Traceback (most recent call last):
File "
试着:
升级六,sk-learn,
sudo pip uninstall python-dateutil
sudo pip install python-dateutil==2.2
pip2 install six -U
pip install --ignore-installed six
pip install --ignore-installed ipython
甚至重新安装anaconda ……
没有修好.
感谢帮助
_________Updata________
我已经检查过我的六个版本是最新版本(版本=“1.10.0”)
import sklearn
sklearn.version
‘0.17.1’
我发现sklearn文件夹中没有文件夹名称“model_selection”.但是https://github.com/scikit-learn/scikit-learn/tree/3078d7d611329c46777d4004a1185a3626558efe/sklearn中有这个文件夹.
安装dev版本后
$pip install git git://github.com/scikit-learn/scikit-learn.git
已成功安装scikit-learn-0.18.dev0
来自.pairwise_fast import _chi2_kernel_fast,_sparse_manhattan
ImportError:dlopen(/Users/Username/anaconda3/lib/python3.5/site-packages/sklearn/metrics/pairwise_fast.cpython-35m-darwin.so,2):未加载库:libmkl_intel_lp64.dylib
参考自:/Users/Username/anaconda3/lib/python3.5/site-packages/sklearn/metrics/pairwise_fast.cpython-35m-darwin.so
原因:找不到图像
import sklearn
sklearn.__version__
'0.17.1'
根据此version的文档,“model_selection”包不存在.它确实存在于dev version.这应该是它抱怨的原因.