Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
402 views
in Technique[技术] by (71.8m points)

python - Scikit-learn version ambiguity

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...