Mehmet Başaran
Mehmet Başaran

Reputation: 77

anaconda/spyder scikit learn update 0.21.3 to 0.22.2

anaconda/spyder scikit learn update 0.21.3 to 0.22.2

(base) mm@mm:~$ python --version
Python 3.7.4
(base) mm@mm:~$ anaconda --version
anaconda Command line client (version 1.7.2)

My scikit-learn version is 0.21.3 but I can't update to 0.22.2 I have tried multpile ways to update but I think this version is not included in my channels. I am using the default channels

How can I update sckit-learn using conda or any other possible way

my history (commands I have tried):

 1509  conda update conda
 1510  spyder 
 1511  conda list
 1512  conda update scikit-learn
 1513  anaconda
 1514  navigator-updater 
 1515  conda list scikit-learn
 1516  conda install scikit-learn=0.22.2
 1517  conda install scikit-learn=0.22
 1518  conda install scikit-learn==0.22.2
 1519  conda install -c intel scikit-learn
 1520  spyder 
 1521  history 

And the error I get when trying to conda install:

(base) mm@mm:~$ conda install scikit-learn=0.22.2
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  - scikit-learn=0.22.2

Current channels:

  - https://repo.anaconda.com/pkgs/main/linux-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/linux-64
  - https://repo.anaconda.com/pkgs/r/noarch

Upvotes: 1

Views: 2771

Answers (1)

FlyingTeller
FlyingTeller

Reputation: 20516

Not every package and not always the most recent versions of packages are available from the default channels when using conda install.

There are two ways you can check what is available from your configured channels:

conda search scikit-learn gives you a list of all packages that match the name scikit-learn and the available versions. On linux x64, this gives me this:

# Name                       Version           Build  Channel
<shortened to last few lines of list>
scikit-learn                  0.22.1  py36h22eb022_0  pkgs/main
scikit-learn                  0.22.1  py36hd81dba3_0  pkgs/main
scikit-learn                  0.22.1  py37h22eb022_0  pkgs/main
scikit-learn                  0.22.1  py37hd81dba3_0  pkgs/main
scikit-learn                  0.22.1  py38h22eb022_0  pkgs/main
scikit-learn                  0.22.1  py38hd81dba3_0  pkgs/main

So only 0.22.1 is available from the default channels. You can also check using anaconda.org where you can use the saerch function to get this: enter image description here

Note the small gray numbers that indicate that anaconda / scikit-learn (the mirror of the default channel) only has version 0.22.1, in accordance with conda search output.

Note also that conda-forge / scikit-learn has your desired version, so you can use this command to install:

conda install -c conda-forge scikit-learn=0.22.2

Upvotes: 1

Related Questions