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:
Developers can download the installer and install on their computer.
Visit the website https://anaconda.org/ and then go to the "Download Anaconda" section. Here you will find that its available in two versions:
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:
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.
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:
Then right click on the Anaconda Prompt program and run as administrator.
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:
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:
Now in the python console run following code:
import tensorflow as tf hello = tf.constant('Hello, TensorFlow!') sess = tf.Session() print(sess.run(hello))
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.
Check more tutorials of TensorFlow at TensorFlow Tutorials page.
Posted on: November 7, 2017 If you enjoyed this post then why not add us on Google+? Add us to your Circles