WINDOWS10 installation TensorFlow (anaconda5.0.0,python3.6.2) __python

Source: Internet
Author: User
Preface

Recently learning TensorFlow, you need to install its environment. Originally intended to install an Ubuntu system for the computer, it was too troublesome to choose to install it in Windows. Because TensorFlow needs more dependent environment, it is time-consuming and laborious to install, and error prone. Search on the internet found the installation of Anaconda, after the practice found that the installation process is very simple and convenient, especially in this record (๑╹◡╹) ノ "" " installation Anaconda5.0.0

Enter Anaconda's official website, click to download the Python3.6 version. After downloading, click Install. The installed directory can be chosen without the default, with one point to note, and two places to go after a certain step:

The picture comes from the network, the version is not 5.0.0, but the two options are the same, here as a demo.

In the 5.0.0 version, the default is to check the second item, but the first item will prompt you not to choose. The first is to let you choose whether to add to the environment variable. This article is not checked at installation time. If you need it later, you can add the Anaconda installation directory to the path in the system environment variable (the installation directory is the directory selected at the time of installation).

After installation, open Anaconda Navigator, as follows:

As you can see, a part of the module is pre-installed after the installation is complete. Anaconda itself is also a package manager that makes it easy to manage the different packages of local Python installations without using the PIP for installation and Anaconda Navigator in a graphical format. Download TensorFlow

Since the computer's GPU is limited, only the CPU version is installed here. Go to the TensorFlow home page on GitHub and drop down to select the Windows Cpu-only version:

Click Build history to download the built version for installation:

Click on the red box to download the file. This file is used for the next installation of the TensorFlow environment. Anaconda Add TensorFlow Environment

Select the environments in the menu bar on the left side of the Anaconda Navigator, then click Create on the bottom of the middle column:


Enter TensorFlow in the box, click Create, this process takes some time. After the environment has been added successfully, the following:

You can see the newly added environment is empty, we can search the above search box to install the module, selected to install. The PIP package is required for the next installation of TensorFlow, search for the package selected, click Apply below to install. Install TensorFlow

Open Anaconda Prompt in the Start directory, and enter activate Tensoflow activates the previous step to add a good environment. At this point the command line becomes (TensorFlow) c:\users\ username, and the pip install path name is entered:


By this step, the TensorFlow installation was successful. TensorFlow Test

Open Anaconda Prompt, enter activate TensorFlow, and then enter the Python command. Enter the following code in the Python environment:

Import TensorFlow as tf  
matrix1 = Tf.constant ([[3., 3.]])   
matrix2 = Tf.constant ([[[2.],[2.]])  
Product = Tf.matmul (matrix1, matrix2)  
sess = tf. session () Result  
= Sess.run (product)  
print result

The results of the operation are as follows:

doubt

The system reported a warning message when performing product = Tf.matmul (matrix1, matrix2):
Your CPU supports instructions that this tensorflow binary is not compiled to USE:AVX AVX2
But the results of the operation are right. Baidu also did not give a better explanation. Now just install and see if there is an impact when you run the specific model later. Reference

http://blog.csdn.net/zhoutaoccu/article/details/70880304

Updated in 2017/10/22

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.