Search code examples
pythonscikit-learnanacondaprompt

downgrade sklearn 0.22.3 to 0.22.2 in anaconda prompt?


When I run in jupyter file

import sklearn
print(sklearn.__version__)

The result is 0.23.2 However I would like to install 0.22.2. Therefore I put into prompt

conda remove scikit-learn

and install:

conda install scikit-learn=0.22.2

unfortunately there is this error:

 PackagesNotFoundError: The following packages are not available from current channels: scikit-learn=0.22.2

How can I delete sklearn version 0.23.2 and install 0.22.2?


Solution

  • You should try adding the conda-forge channel to your list of channels when you search for packages.

    This should work:

    RUN

    conda config --append channels conda-forge
    

    and

    conda install scikit-learn=0.22.2
    

    OR

    RUN

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

    instead of 2 above commands