Skip to content
Related Articles

Related Articles

How to Install Keras on Linux?

Improve Article
Save Article
Like Article
  • Last Updated : 16 Oct, 2021

Keras is an open-source software library that offers a Python interface for ANN (artificial neural networks). It acts as an interface for the TensorFlow library. It offers consistent & simple APIs, minimizes the number of user actions required for common use cases, and provides clear & actionable error messages. Furthermore, it also has extensive documentation and developer guides. Today, in this article, we are going to learn how we can install Keras on a Linux machine.

Before starting the installation of actual Keras, we need to install one of its backend engines i.e. TensorFlow, Thea no, or Microsoft CNTK. In this article, we are going to install TensorFlow.

Installing Keras on Linux:

Method 1: Using python package manager PIP.

Step 1: Run the following command in the terminal to install TensorFlow:

pip3 install tensorflow
install tensorflow

Installing TensorFlow

Step 2: To install Keras, run the following command:

pip3 install Keras
install Keras on linux

Installing Keras

Step 3: To verify the installation, run the following command:

pip show keras
verify keras installation on Linux

Verifying the installation

As indicated in the above figure, we can see the Keras is successfully installed with version 2.6.0.

Method 2: Installing Keras from GitHub

Follow the below steps to install Keras from Github:

Step 1: Clone into the Keras repository by running the following command:

git clone
Installing Keras from GitHub on linux

Cloning into Keras repo

Step 2:  Navigate to the Keras folder and run the setup file.

Changing directory to the Keras setup folder:

cd keras/keras/tools/pip_package

Running the setup file to install Keras:

sudo python3 install

Keras installed

This will install the Keras onto your Linux system.

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!