Installing TensorFlow on windows with Anaconda

In this tutorial I will teach steps for Installing TensorFlow on windows with Anaconda.

Installing TensorFlow on windows with Anaconda

Steps of Installing TensorFlow on windows with Anaconda

In this tutorial we are going to teach you step by step process of Installing TensorFlow on windows with Anaconda. We will install Anaconda for python 3.6 and then install TensorFlow CPU version.

Anaconda is open source feature rich distribution of python which comes with large number of package for machine learning. Its very easy to download a new package with anaconda tool. It helps developers to quickly install and create their development environment on windows and other operating system.

Anaconda python distribution supports R and Python programming language which can be used to develop various machine learning applications. Anaconda distribution of Python can be used develop application for large scale data processing, machine learning, predictive analysis and performing various scientific calculations. Its Python distribution for data scientist and mathematicians.

Anaconda distribution are available for:

  • Windows
  • Linux
  • MacOSX

Developers can download the installer and install on their computer.

Installing TensorFlow on windows with Anaconda

Step 1: Download Anaconda

Visit the website and then go to the "Download Anaconda" section. Here you will find that its available in two versions:

  • Python 3.6 version
  • Python 2.7 version

As per your requirement you can download any of the version. But for TensorFlow we are using Python 3.6 version. So click on the "Python 3.6 version" --> 64-Bit Graphical Installer (515 MB)  download link as shown below:

Download anaconda with Python 3.6

Step 2: Install Anaconda

Now the next step is to install Anaconda on Windows, for this double click the installer and it will start installation. Follow the steps and complete installation. Following video tutorial will guide you in installing Anaconda on Windows.

Vide Tutorial: Installing Anaconda on Windows

After installation and testing of Python you can start installing TensorFlow.

Step 3: Install TensorFlow with Anaconda

Here is complete video instruction of installing Tensor flow on Windows with anaconda:

In the final step we will install TensorFlow with Anaconda and run a simple TensorFlow program. We will use the Anaconda prompt to install TensorFlow. Go to "Windows" --> Search for "Anaconda Prompt" as shown below:

Anaconda Prompt

Then right click on the Anaconda Prompt program and run as administrator.

Anaconda Prompt run as adminstrator


Then run the following command to create an environment named "tensorflow":

conda create -n tensorflow python=3.5

Then activate this environment with following command:

activate tensorflow

Now you can either install CPU or GPU based TensorFlow. In this tutorial I am installing CPU based TensorFlow.

To install the CPU-only version of TensorFlow:

pip install --ignore-installed --upgrade tensorflow

To install the GPU version of TensorFlow:

pip install --ignore-installed --upgrade tensorflow-gpu

Now we can test TensorFlow in Pyton console. Open python console with following command:

python 0

Now in the python console run following code:

import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()

It should run perfectly without any error and print Hello, TensorFlow! message.

In this tutorial you learned the steps for Installing TensorFlow on windows with Anaconda. 1

Check more tutorials of TensorFlow at TensorFlow Tutorials page.