Installing TensorFlow on Windows Easy for Python beginners

Install TensorFlow 1.6 on Windows 10. Basically, I install while looking at the Official Site. I'm a person who hasn't done Python very much, but that's fine. This article uses Anaconda, but Miniconda is also recommended because it can significantly reduce the disk space used. For Miniconda, please refer to the following two articles.

-Install Miniconda on Windows (2018) -Building TensorFlow environment using Miniconda on Windows (2018)

I wrote an environment comparison on Windows in the article "Summary of how to create a machine learning environment on a Windows PC". Please refer to the article "Installing TensorFlow on Ubuntu of WSL" for building a TensorFlow environment on Ubuntu. I also recommend a cloud service called Google Colaboratory. It's easier than Anaconda or Miniconda because you can use TensorFlow without setting up a local environment. Please refer to the article "Google Colaboratory Overview and Instructions (TensorFlow can also be used)" for how to use it.

* The TensorFlow part has been completely renewed from 1.3 installation instructions to 1.6 (2018/3/6) </ sup> * Confirmed that the procedure does not change even with TensorFlow 1.7 (screen shots in this article are still old) (2018/4/10) </ sup>

type version Contents
OS Windows10 Professional 64bit I had never installed Python or Anaconda
CPU Intel Corei7-7600U vPro 2.8GHz With NVIDIA GPU"TensorFlow with GPU support"Can be used(However, it seems that the time and effort will increase a little at the time of installation.)。
Anaconda3 Anaconda 5.0.1 There is also a way to use pip, but Anaconda seems to be more convenient.
The screen shot of the installation procedure is old 4.4.0, but 5.0.Even 1 is not much different.
TensorFlow TensorFlow 1.6 TensorFlow with CPU support only.The content of this blog is"TensorFlow with GPU support"Does not correspond toSo please be careful
Reference link

-[Explanation for beginners] TensorFlow basic syntax and concept -[Explanation for beginners] TensorFlow tutorial MNIST (for beginners) -Visualize TensorFlow tutorial MNIST (for beginners) with TensorBoard -TensorFlow API memo -[Introduction to TensorBoard] Visualize TensorFlow processing to deepen understanding -[Introduction to TensorBoard: image] TensorFlow Visualize image processing to deepen understanding -[Introduction to TensorBoard: Projector] Make TensorFlow processing look cool -[Explanation for beginners] TensorFlow Tutorial Deep MNIST -Yuki Kashiwagi's facial features to understand TensorFlow [Part 1]

procedure

1. Anaconda installation

Anaconda in the first place

Use native pip or Acaconda to install TensorFlow. Google officially supports native pip. Anaconda is positioned as support by the community. Anaconda is overwhelmingly convenient!

1.1. Anaconda installer download

Download from the Official Download Page. Download Anaconda 4.4.0 64-BIT INSTALLER. 10.Anaconda_Install01.PNG

1.2. Anaconda installation

I don't really need to mention it, but I'll leave only the screen. It seems that I have seen information that an error will occur afterwards if Japanese is included in the installation path ... (memory is ambiguous) 10.Anaconda_Install02.PNG 10.Anaconda_Install06.PNG 10.Anaconda_Install07.PNG 10.Anaconda_Install08.PNG 10.Anaconda_Install09.PNG 10.Anaconda_Install02.PNG 10.Anaconda_Install03.PNG 10.Anaconda_Install04.PNG 10.Anaconda_Install05.PNG

2. Create Anaconda virtual environment

2.1 Create TensorFlow virtual environment

Create a TensorFlow virtual environment with the name "tensorflow16" in Anaconda Navigator. Launch Anaconda Navigator from the Windows menu. Similar to Apache Ambari. 20.Anaconda_Navigator01.PNG 20.Anaconda_Navigator02.JPG

Select Python 3.6 for Windows on this screen. 10.InstallTensorFlow02.JPG

With this alone, a virtual environment is created. Fortunately there are no errors.

2.2 Install Jupyter Notebook in virtual environment

Later, I will install Jupytor Notebook because it seems to be useful. It is a function that can execute Python interactively like Apache Zeppelin. There is no need, so you can omit it. However, the procedure is very simple and convenient, so we recommend installing it.

3. Install TensorFlow

Well, this is the main subject. Install TensorFlow on the virtual environment. Open a terminal from the virtual environment. 10.InstallTensorFlow03.JPG

The rest is completely as per the Official Guide. Contrary to the official guide, "conda install" seems to speed up the runtime process. .. With information like conda and pip: Danger of mixing, is "conda install" better?

pip install --ignore-installed --upgrade tensorflow

For reference, the screen when updating from TensorFlow 1.2 to 1.3 was like this (command is the same). 50.UpgradeTensorFlow130_01.JPG

Confirmation of installation. This is also the confirmation method according to the Official Guide.

Start Python (I'm doing it from the previous flow).

python

The rest is the Hello World command execution.

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

I got a warning but it was successful! No error occurred. Finally, close the terminal with the following command.

exit()
deactivate
exit

By the way, the warning "The TensorFlow library wasn't compiled to use AVX instructions" when running Hello World told me that it would be faster, and it was not an error. For details, see Linkを参照ください。

Recommended Posts

Installing TensorFlow on Windows Easy for Python beginners
Installing Kivy on Windows10 64bit Python3.5
Installing Kivy-Designer on Windows10 64bit Python3.5
Notes for using OpenCV on Windows10 Python 3.8.3.
Programming environment for beginners made on Windows
[Note] Procedures for installing Ubuntu on Windows 10
Use without installing python 2.x on Windows
Python for super beginners Python for super beginners # Easy to get angry
(Windows) Causes and workarounds for UnicodeEncodeError on Python 3
Notes on installing Python3 and using pip on Windows7
Build procedure for TensorFlow 2.4.0 (Windows10, CUDA11.1.1, cuDNN 8.0.5, Python 3.8.6)
python textbook for beginners
Easy understanding of Python for & arrays (for super beginners)
python basic on windows ②
Install python on windows
Build TensorFlow on Windows
[Note] Installing Python 3.6 + α on Windows and RHEL
Rock-paper-scissors with Python Let's run on a Windows local server for beginners
OpenCV for Python beginners
Install Python (for Windows)
[Python] This is easy! Search for tweets on Twitter
Build a Python extension for E-Cell 4 on Windows 7 (64bit)
[Heroku] Memo for deploying Python apps using Heroku on Windows [Python]
A memo of installing Chainer 1.5 for GPU on Windows
PIL with Python on Windows 8 (for Google App Engine)
Procedure for building a CDK environment on Windows (Python)
Beginners use Python for web scraping (4) --2 Scraping on Cloud Shell
For those who can't install Python on Windows XP
Set-enable Python virtualenv on Windows
Run Openpose on Python (Windows)
Installation notes for TensorFlow for Windows
Learning flow for Python beginners
Python 3.6 installation procedure [for Windows]
Python + Kivy development on Windows
F2py on Miniconda for Windows
Sphinx-autobuild (0.5.2) on Windows7, Python 3.5.1, Sphinx 1.3.5
Build Python environment on Windows
Run Tensorflow 2.x on Python 3.7
Python3 environment construction (for beginners)
Notes on installing Python on Mac
Python #function 2 for super beginners
Build python environment on windows
Introducing TensorFlow on Ubuntu + Python 2.7
Basic Python grammar for beginners
100 Pandas knocks for Python beginners
I ran python on windows
Python #list for super beginners
~ Tips for beginners to Python ③ ~
Notes on installing Anaconda 3 on Windows
[Python] [Chainer] [Windows] Install Chainer on Windows
Use Python on Windows (PyCharm)
Notes on installing Python on CentOS
Install dlib for Python (Windows)
How to learn TensorFlow for liberal arts and Python beginners
Build Python3 for Windows 10 on ARM with Visual Studio 2019 (x86) on Windows 10 on ARM
Create a virtual environment for python on mac [Very easy]
[Explanation for beginners] TensorFlow tutorial MNIST (for beginners)
Python environment construction memo on Windows 10
TensorFlow MNIST For ML Beginners Translation
Python 3.6 on Windows ... and to Xamarin.
Python Exercise for Beginners # 2 [for Statement / While Statement]