Reputation: 308
I am trying to update scikit-learn
library via pip
, yet I have not succeded due to error occurences.
I have initially updated it using the command below:
sudo pip install -U scikit-learn
Though, it says that:
Requirement already up-to-date: scikit-learn in /usr/local/lib/python2.7/dist-packages
Which to my concern means that it is the latest version 0.19.0
But when I check the version directly in Python interpreter, it returns 0.16.1
:
>>> import sklearn
>>> print sklearn.__version__
0.16.1
How can I update to the latest version?
Upvotes: 0
Views: 2141
Reputation: 855
By prepending sudo
in the pip
call, you are referring to the system's python instead of a virtualenv one.
If you are within a virtualenv, simply do pip install -U scikit-learn
(i.e. drop the sudo).
EDIT:
OP installed sklearn with apt, sudo apt remove --purge python-sklearn
and reinstall sklearn with pip
solved it.
Upvotes: 5