How To Install Anaconda, Jupyter Notebook & Tensorflow To Start With Deep Learning in 10 mins

Adarsh Verma
Deep Data Science
Published in
4 min readMay 14, 2019

In this post, we will see how to set up the environment to start up with deep learning on windows from step 0. This includes installing Anaconda, installing Tensorflow, Jupyter Notebook and running them on your computer within 10 mins.

  1. Download Anaconda

Why use Anaconda distribution of Python?
Anaconda is open source, high-performance distribution of Python. It makes data science and machine learning tasks easier to work with. Package management becomes easy. Here’s the link to download and install Anaconda:

While installing on windows, the prompt will ask to add Anaconda to the path, you can click that checkbox or add it manually so that you can run it from any directory.

2. Creat Conda Environment & Install Tensorflow and Jupyter Notebook

What is a conda environment and why do we need to create it?
Conda is a package and environment management system. Conda environment is a virtual environment with all the required dependencies for a purpose/project. As you know, you need to install different packages to use different functionalities in Python. Now, what if already using for example , Tenforflow 1.0 with one of your projects and you want to use Tensorflow 2.0 for some other project. So, it’s a better approach to create and maintain separate environments meant for different purposes, that have different versions of Python and/or packages installed in them.

So, we will create a new environment and will keep all the relevant package in that environment.

  1. Create/download environment File:- For the purpose of deep learning, we need Tensorflow along with many other packages. We will specify all the dependencies in one file including tensorflow and notebook related packages at once to make it handy. Creating a file is not necessary, you can create a conda environment without a file and install the packages later. You can directly download the file to set up the environment very easily with all the required dependency. Download the file here

Note:- After downloading the file for environment setup, you will notice the file extension, .yml file extension belongs to YAML language. Which is a human-readable data-serialization language commonly used for configuration files. We have to provide environment file to conda specifically in YAML.

2. Create conda environment with the file — Now open the anaconda prompt and navigate to the location of the file you downloaded in above step and create the environment with below command by specifying the filename:

conda env create -f tf_dl_env.yml

‘tf_dl_env.yml’ is the name of the environment file. Inside the file, name: ‘tf_dl’ is the name of the environment and the rest of the file is about the required packages. After running the command it might ask for the permission, enter y for yes to continue the environment setup. This step will create a new environment.

3. Activate the environment — To use the environment, we need to activate it with the below simple command:

activate tf_dl

You’ll see tf_dl (the name of the environment) will appear at the very beginning of the line in command prompt like (tf_dl) C:\<other dir>

4. Run Jupyter Notebook & Verify Tensorflow Installation — To open up the jupyter notebook type below command and hit enter to execute the command:

jupyter notebook

This command will open up the browser automatically for you, and also give an URL to open it manually by copy and pasting in the browser. You will see a page like below in the browser with the “New” option for a new jupyter notebook.

Click on “New” and then Python 3 to open up a new notebook with Python3. Let’s verify the installation of Tensorflow with below commands:

It shows version 1.3.0 for Tensorflow. We have successfully installed/setup everything to start working on some interesting deep learning projects like image recognition, text classification, etc..

Give a clap if this post helped you.

--

--