Easy setup a Python Deep Learning Environment

If you have decided to get your hands dirty in deep learning, you have been looking for an easy and straight forward guide to setup a local deep learning environment. That’s we will do today.

Overview

  1. Download Anaconda.
  2. Install Anaconda.
  3. Install Deep Learning libraries.
  4. Test the setup.

Step 1. Download Anaconda

First we will download Anaconda python package for your OS.

a. Go to the Anaconda Cloud website here.

b. Go to Download Anaconda located on the top right.

c. Now choose the package specific for your OS. Choose the desired Python version and CPU architecture(32 or 64bit) of your system and click on the download button.

I am using macOS but you can choose according to your OS.

Step 2. Install Anaconda

Now we will install the Anaconda package. This package will install Python and various libraries.

The installation will be a standard step-by-step installation as per your Operating System.

Step 3. Install Deep Learning libraries

Now, we will install and update some libraries. These are the most important libraries for a Deep Learning setup.

a. Install Tensorflow

For installing CPU-only version of Tensorflow, if you have CPU-supported system enter the following in terminal (Command Prompt on Windows).

pip3 install tensorflow
pip3 install --upgrade tensorflow

For installing the GPU version enter the following in the terminal :

pip3 install tensorflow-gpu
pip3 install --upgrade tensorflow-gpu

b. Install Keras

Open terminal and enter the following:

pip3 install keras
pip3 install --upgrade keras

Now you have the setup for doing Deep Learning stuff.

Step 4. Test the setup

Lets test the setup if it is working fine on the system.

Open terminal and enter the following to start a Python shell:

python3

Now run the following in the shell.

>>>import tensorflow 

If this doesn’t gives you an error then everything is working fine as it should be.

Congratulations ! 👍 You have successfully done setup for a Deep Learning environment using Keras and Tensorflow. This is was an easy and straight forward method, but for setting up a GPU supported system there are some additional steps to be done.

If you don’t have a GPU supported system(same pinch), you can try Floydhub, Amazon Web Services or Google Cloud Platform for running your code on the cloud paying for the service.

But if you want some free alternative try out Google Collab, powered by Tesla K80 GPU with Jupyter Notebook at the front.

Please click the 👏 button if you liked the story and helped you in any way. Feel free to comment.

Machine/Deep Learning, Amateur Photographer

Machine/Deep Learning, Amateur Photographer