How to upgrade scikit-learn package in anaconda

前端 未结 6 1048
难免孤独
难免孤独 2020-12-01 05:33

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-l

6条回答
  •  抹茶落季
    2020-12-01 06:14

    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:

    conda list    
    

    It will show different packages and their installed versions in the output. Here check for scikit-learn. e.g. for me, the output was:

    scikit-learn              0.19.1           py36hedc7406_0  
    

    Now I want to Upgrade to 0.19.2 July 2018 release i.e. latest available version.

    conda config --append channels conda-forge
    conda install scikit-learn=0.19.2
    

    As you are trying to upgrade to 0.17 version try the following command:

    conda install scikit-learn=0.17
    

    Now check the required version of the scikit-learn is installed correctly or not by using:

    conda list 
    

    For me the Output was:

    scikit-learn              0.19.2          py36_blas_openblasha84fab4_201  [blas_openblas]  conda-forge
    

    Note: Don't use pip command if you are using Anaconda or Miniconda

    I tried following commands:

    !conda update conda 
    !pip install -U scikit-learn
    

    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.

提交回复
热议问题