Scikit-learn version ambiguity

家住魔仙堡 提交于 2019-12-11 20:36:25

问题


I have anaconda 2.7 for Windows 7, 64 bit. I wanted to upgrade my scikit-learn version from 0.15 to 0.16.1 but I had some connection problems so I could not follow the guide here: http://scikit-learn.org/dev/install.html#id1 (I tried several times...) . So I used scikit-learn-0.16.1.win-amd64-py2.7.exe (md5) downloaded from https://pypi.python.org/pypi/scikit-learn/0.16.1. When I go to check the version of scikit learn in spider using the code:

 import sklearn
 sklearn.__version__

I read the exact version, that is: '0.16.1' but if I try to use:

from sklearn import cross_validation

I have the following error:

ImportError: cannot import name check_arrays

that means that actually, it doesn't use the version 0.16.1! So how can I solve? I tried to unistall and install again but it is the same. Since I have network restriction I can't access to the web using the command windows. Thank you


回答1:


You can't upgrade a package installed with anaconda with pip. Just do conda update scikit-learn, see the installation docs



来源:https://stackoverflow.com/questions/30666685/scikit-learn-version-ambiguity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!