I am trying to upgrade package of scikit-learn from 0.16 to 0.17. For that I am trying to use binaries from this website: http://www.lfd.uci.edu/~gohlke/pythonlibs/#scikit-learn. I have Windows 7 x64 bit. I downloaded the relevant package locally and gave following commands and got Requirement already up-to-date:
C:\Users\skumar>pip install --upgrade --use-wheel --no-index --find-links=../../
SOURCE/APPS scikit-learn
Ignoring indexes: https://pypi.python.org/simple
Requirement already up-to-date: scikit-learn in c:\anaconda3\lib\site-packages
Then I tried to upgrade it from remote site and got similar result:
C:\Users\skumar>pip install --upgrade --use-wheel --no-index --trusted-host www.
lfd.uci.edu --find-links=http://www.lfd.uci.edu/~gohlke/pythonlibs/ scikit-learn
Ignoring indexes: https://pypi.python.org/simple
Requirement already up-to-date: scikit-learn in c:\anaconda3\lib\site-packages
On Remote site there are two versions i.e., 0.16 & 0.17. Is there a way to specify version in command? Or how do you install/upgrade wheel file?
I would suggest using conda. Conda is an anconda specific package manager. If you want to know more about conda, read the conda docs.
Using conda in the command line, the command below would install scipy 0.17.
Anaconda comes with the
conda
package manager which is designed to handle these kinds of upgrades. Start by updating conda itself to get the most recent package lists:And then install the version of scikit-learn you want
All necessary dependencies will be upgraded as well. If you have trouble with conda on Windows, there are some relevant FAQ here: http://docs.continuum.io/anaconda/faq
Following Worked for me for scikit-learn on Anaconda-Jupyter Notebook.
Upgrading my scikit-learn from 0.19.1 to 0.19.2 in anaconda installed on Ubuntu on Google VM instance:
Run the following commands in the terminal:
First, check existing available packages with versions by using:
It will show different packages and their installed versions in the output. Here check for scikit-learn. e.g. for me, the output was:
Now I want to Upgrade to 0.19.2 July 2018 release i.e. latest available version.
As you are trying to upgrade to 0.17 version try the following command:
Now check the required version of the scikit-learn is installed correctly or not by using:
For me the Output was:
Note: Don't use pip command if you are using Anaconda or Miniconda
I tried following commands:
It will install the required packages also will show in the
conda list
but if you try to import that package it will not work.On the website http://scikit-learn.org/stable/install.html it is mentioned as: Warning To upgrade or uninstall scikit-learn installed with Anaconda or conda you should not use the pip.
So to upgrade scikit-learn package, you have to follow below process
Step-1: Open your terminal(Ctrl+Alt+t)
Step-2: Now for checking currently installed packages along with the versions installed on your conda environment by typing
conda list
Step-3: Now for upgrade type below command
Hope it helps!!
If you are using Jupyter in anaconda, after
conda update scikit-learn
in terminal, close anaconda and restart, otherwise the error will occur again.