Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unable to update scikit-learn to version 0.20

I am trying to update sklearn from 0.19.2 to 0.20 by running

conda update scikit-learn

in the anaconda prompt, but it does not update the package... I get

Solving environment: done

# All requested packages already installed.

I also tried

conda update conda

and then again conda update scikit-learn but I also get (for both updates)

Solving environment: done

# All requested packages already installed.

if I check sklearn version I still get

import sklearn
sklearn.__version__

 '0.19.2'

If I type conda info I get

     active environment : base
    active env location : C:\ProgramData\Anaconda3
            shell level : 1
       user config file : C:\Users\xxx\.condarc
 populated config files :
          conda version : 4.5.11
    conda-build version : 3.10.5
         python version : 3.6.5.final.0
       base environment : C:\ProgramData\Anaconda3  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/win-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/pro/win-64
                          https://repo.anaconda.com/pkgs/pro/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:\ProgramData\Anaconda3\pkgs
                          C:\Users\xxx\AppData\Local\conda\conda\pkgs
       envs directories : C:\ProgramData\Anaconda3\envs
                          C:\Users\xxx\AppData\Local\conda\conda\envs
                          C:\Users\xxx\.conda\envs
               platform : win-64
             user-agent : conda/4.5.11 requests/2.18.4 CPython/3.6.5 Windows/10 Windows/10.0.17134
          administrator : True
             netrc file : None
           offline mode : False

If I try to install sklearn 0.20.0

conda install scikit-learn=0.20.0
Solving environment: done

## Package Plan ##

  environment location: C:\ProgramData\Anaconda3

  added / updated specs:
    - scikit-learn=0.20.0


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    scikit-learn-0.20.0        |   py36heebcf9a_1         5.2 MB

The following packages will be REMOVED:

    imbalanced-learn: 0.3.3-py_0            conda-forge

The following packages will be UPDATED:

    scikit-learn:     0.19.2-py36heebcf9a_0             --> 0.20.0-py36heebcf9a_1

Proceed ([y]/n)? n

I get that sklearn is trying to remove a package (imbalanced-learn) that I use..

Should I uninstall and reinstall?

like image 759
gabboshow Avatar asked Nov 15 '18 08:11

gabboshow


1 Answers

It seems that imbalanced-learn requires a specific version of scikit-learn. If you want to upgrade sklearn to latest version, you may have to remove imbalanced-learn.

Suggestion:

I would suggest to work with python-virtualenv which allow create separate environment for python projects and handle package dependencies without impacting main system .

like image 200
Amine Benatmane Avatar answered Oct 31 '22 11:10

Amine Benatmane