Tensorflow is a popular framework for deep learning. Ideally, the deep learning software tools and programs should be delpoyed on a Linux server which is more stable and more efficient to make use of the GPU computation power. Running the deep learning software on Windows is an option when the Linux server is not available, or the purpose is just for learning and testing, not for operational work.
This post will describe the procedures on how to set up the software environment of deep learning (Tensorflow) on Windows.
Step 1: Install Python
A version of Python 3.6 or above is recommended. I personally chose to use Python 3.6.6. The installation package can be downloaded from the weblink:
Make sure to choose the 64 bit version, since Tensorflow can hardly be used under a 32 bit machine.
Step 2: Install GPU driver, cuda and cudnn library
If you have a NVIDIA GPU card, you can follow this step, otherwise, you can skip this step.
You can go to the NVIDIA website to download the latest version of the GPU driver which matches the model of your GPU card. Then download the cuda and cudnn libraries which are required by Tensorflow. You may need to register an account on the NVIDIA website when trying to download the libraries. The version of cuda and cudnn libraries I chose to use is version 10.0. We do not need to use the most recent version of the cuda and cudnn libraries since the Tensorflow is picky about the cuda and cudnn versions.
Step 3: Install an IDE for python programming
Python’s built-in IDE seems not efficient and slow when running a computation intensive program. That is mainly the reason why we need to use a different IDE for python.
LiClipse is a good choice for the IDE. It is very similar to Eclipse and supports python, java and other programming languages. It can be downloaded from:
Make sure that you set up the correct python path in the python project properties.
LiClipse is a commercial software. If you prefer to use Eclipse which is a free software, you can go to
https://www.eclipse.org/downloads/ to download the latest version of Eclipse and after the installation of Eclipse, install the new software of pyDev from the help menu of Eclipse. You need to input the link of pyDev to install the Python IDE for Eclipse:
The IDE software also requires a certain version of java. The version I use is jre-8u211-windows-x64. You can go to the website of Oracle to get that version of java to install.
If you see an error when running a python program from LiClipse, it means you may need to install the Microsoft Visual C++ Redistributable for Visual Studio at:
Step 4: Install Tensorflow
upgrade the pip3 first:
python -m pip install --upgrade pip
Find out what versions of Tensorflow are available to install:
pip3 install tensorflow==
pip3 install tensorflow-gpu== if you have a GPU card.
Find out what versions of OpenCVare available to install:
pip3 install opencv-python==
Install the Tensorflow and OpenCV:
pip3 install opencv-python==22.214.171.124
pip3 install tensorflow==1.14.0
pip3 install tensorflow-gpu==1.14.0 (if you have a GPU)
Use the command below to test if the installation is succssful:
C:\Users\suh> python -c "import cv2; print(cv2.__version__)"
C:\Users\suh> python -c "import tensorflow as tf; print (tf.__version__)"
Tensoflow 1.14.0 is the most recent stable version. Tensoflow-gpu 1.14.0 requires cuda and cudnn version 10.0.
Step 5: Go through the tutorial course on Tensorflow
Follow the official website: