Open In App

How to Install Scikit-Learn in Windows?

Improve
Improve
Like Article
Like
Save
Share
Report

Scikit Learn is an open-source Python library that implements a range of machine learning, preprocessing, cross-validation, and visualization algorithms using a unified interface. In this article, we will look into how to install the Scikit-Learn library in Windows.

Pre-requisites

Before starting, the following things should be pre-installed on Windows:

Installing Scikit-Learn Library on Windows:

For Conda Users

If you want the installation to be done through conda,  open up the Anaconda Powershell Prompt and use the below command:

conda install -c conda-forge scikit-learn

Type y for yes when prompted.

You will get a similar message once the installation is complete:

installing scikit-learn on windows using conda

Make sure you follow the best practices for installation using conda as:

  • Use an environment for installation rather than in the base environment using the below command:
conda create -n my-env
conda activate my-env

Note: If your preferred method of installation is conda-forge, use the below command:

conda config --env --add channels conda-forge

For PIP Users

Sklearn pip install can be used for scikit-learn installation. Users who prefer to use pip can use the pip install sklearn command as given below to install the Scikit-Learn library on Windows:

pip install scikit-learn

You will get a similar message once the installation is complete:

installing scikit-learn on windows using pip

Verifying Scikit-Learn Library Installation on Windows:

To verify if Scikit learn library has been successfully installed using pip install sklearn in your system run the below command:

python -m pip show scikit-learn

If the installation is successful, you’ll get the following message:

verifying scikit-learn installation on windows


Last Updated : 24 Nov, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads