Most tutorials on the web are based on distributions such as Ubuntu and Python2.7, and few are based on Windows and Python3.6 (TensorFlow for Windows only supports Python3.6), so I have taken notes for this article.

Environment set up

Software version

Windows 7 SP1 or Windows 10 (other Windows should be similar); Anaconda, download the latest version directly from the official website, 32-bit, 64-bit note that I use 64-bit; TensorFly, installed using Anaconda; Vistual Studio Code is a lightweight, plugin-rich editor that can be installed with Anaconda or via the official website. Jupyter QtConsole, a useful console, is installed using Anaconda.

Software installation

Anaconda installation

Anaconda is easy to install. The next step is the next step. You can set Anaconda as the default Python 3.6 during the installation.

TensorFlow installation

Creating a dedicated environment (recommended)

Once installed, go to Start -> All Programs -> Anaconda -> Anaconda Navigator;

Install TensorFlow in your environment

I’m going to go ahead and select the environment that you just created, I’m going to call it TensorFlow, hit run, Open Terminal; Type the command

pip install --ignore-installed --upgrade tensorflow
Copy the code

Wait until the installation is successful.

Vistual Studio Code and Jupyter QtConsole Installation (optional)

In home, make sure that for the environment in which you want to develop TensorFlow, I call it TensorFlow, and then select the software you want to install. I have the environment installed, so here is launch.

Environment setup verification (choose one of three)

Jupyter QtConsole validation

Start Jupyter QtConsole input

import tensorflow as tf
Copy the code
tf.__version__
Copy the code
tf.__path__
Copy the code

Terminal authentication

Click on the environment you just created, I call it TensorFlow, click on the Run button, select Open Terminal, type in the Python command to start the Python Console, type in the command above will have the same effect.

conclusion

On Windows, it is very convenient to install TensorFlow using Anaconda. If you just need to learn and do not need CPU or GPU instruction set optimization, you can quickly install TensorFlow in this way. If you need hardware optimization, you need to compile TensorFlow and download the corresponding software. In the next article, we will document our first TensorFlow program.