Install TensorFlow, Keras and Theano using Anaconda for Deep learning
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.
- Download and Install Anaconda
- Create new Anaconda environment
- Installing TensorFlow and Keras
- Test the installation
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.
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
Createoption at the bottom to create a new environment.
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.
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.
import tensorflow as tf import keras
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)
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!!