Open In App

How to Install Keras in Windows?

Last Updated : 21 Sep, 2021
Improve
Improve
Like Article
Like
Save
Share
Report

Keras is a neural Network python library primarily used for image classification. In this article we will look into the process of installing Keras on a Windows machine.

Pre-requisites:

The only thing that you need for installing Numpy on Windows are:

Keras Dependencies:

The Keras library has the following dependencies:

  • Numpy
  • Pandas
  • Scikit-learn
  • Matplotlib
  • Scipy
  • Seaborn

Note: All these dependencies can be manually installed. But if you are missing one or all of these dependencies, they get installed when you run the command to install Keras automatically.

Installing Keras Library on Windows using Conda:

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 keras

Type y for yes when prompted.

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

installing keras 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

Verifying Keras Installation on Windows using Conda:

To verify if Keras library has been successfully installed in your system run the below command in Anaconda Powershell Prompt:

conda list keras

You’ll get the below message if the installation is complete:

verifying keras installation using conda

Installing Keras Library on Windows using PIP:

Users who prefer to use pip can use the below command to install the Keras library on Windows:

pip install keras

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

installing keras on Windows using pip

Verifying Keras Installation on Windows using PIP:

To verify if Keras library has been successfully installed in your system run the below command in your command prompt:

python -m pip show keras

You’ll get the below message if the installation is complete:

verifying keras installation using pp

 


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads