Install TensorFlow, Keras and Theano using Anaconda for Deep learning

Pranay
May 17, 2020  ยท  22949 views

This post helps you to setup Deep learning environment with Python, TensorFlow, Keras and Theano library using Anaconda. It does not use command line so even a naive user can do this setup.

This setup uses Anaconda and installs Keras, TensorFlow using the GUI available on the Anaconda Navigator. Below are the steps involved in completing this setup.

  1. Download and Install Anaconda
  2. Create new Anaconda environment
  3. Installing TensorFlow and Keras
  4. Test the installation

Image Text

1. Download and Install Anaconda

Anaconda is an open source Python distribution to perform Machine Learning and Data science operations. Download Anaconda distribution of Python (Python 3.7 is preferred) from this link here - Download Anaconda.

Image Text

After the download, install the Anaconda using the .exe. The installation should be straight away.

2. Create new Anaconda environment

After installing Anaconda, open Anaconda Navigator and create a new environment.

  • Click on Create option at the bottom to create a new environment.

1. Anaconda

Image Text

3. Installing TensorFlow and Keras

Anaconda does also work as a package manager. So it does provide an option to install required packages directly from the Anaconda Navigator.

Type TensorFlow in the search box, select the TensorFlow and apply to install the compatible TensorFlow package.

Now type in Keras and install Keras library to our environment.

Similarly, type in Theano and install Theano package.

Image Text

Image Text

4. Test the installation

As we are done installing TensorFlow and Keras, we should validate the installation. For that open the Python terminal from Anaconda Navigator and try importing each of these packages and check the response. If the import is successful there wont be any error.

Image Text

import tensorflow as tf
import keras

Image Text

5. Setup Spyder IDE##

Lets also install the Spyder IDE for the environment we have created. Install and launch Spyder from the Navigator.

To validate the installation, run the same import statements in the Spyder and check the output (select the code and click Ctrl+Enter to run the code)

Spyder

Launch Spyder

If you have made this far then probably you are pretty serious in learning and building Deep Learning models.

For a more detailed tutorial I strongly suggest to go through this course on Deep Learning - Complete Deep Learning course for beginners from Udemy

Hope this helps you. Please comment your thoughts!!

AUTHOR

Pranay

A Software Engineer by profession, a part time blogger and an enthusiast programmer. You can find more about me here.


Post a comment




Thank you! You are now subscribed.

Sign up for our newsletter

Subscribe to receive updates on our latest posts.

Thank you! You are now subscribed.