<>TensorFlow stay windows Installation under



preface : from 2015 Google will tensorflow After open source , This powerful artifact for deep learning Caffe,Keras,Torch7 Wait until all the people are killed ,github On star and fork All the way up , Almost the sum of them , of course , I'm not here to lick each other every day , Bloggers have been following its latest news since it was released , And nibbled at the original English version of the official API, Thank you geeks for translating it into Chinese , Bloggers also check Chinese in time , Moisten it twice more , Two times down , I figured out to get the system in place first , Refine the pill again . This guy's ready , Almost a day's use of my world , Stepped on countless pits , Countless times Google , Baidu , Zhihu , forum , I finally built my tensorflow Environmental Science , And finally wrote my “Hello
TensorFlow!”. Although the blogger has been involved linux, But the blogger's humble computer can't provide enough memory on the virtual machine , So I decided to take the risk , Based on windows Version of wild tensorflow.

One more word : This article is for those who want to build tensorflow Put forward feasible scheme of children's shoes , I just want to fill in the hole for you with the miserable experience of the blogger , Put you in light , Focus on later learning .




<>1. install Anaconda


tensorflow Is based on python Script language , Is an advanced application , It must rely on the underlying application to play a role . So it needs to be installed python, Of course, it needs to be installed numpy,scipy,six,matplotlib Wait for dozens of expansion packages . If you install one by one , Very time consuming , But now there's an integrated environment anaconda, Easy to install .python Most of the expansion packs for , Are integrated in anaconda It's inside , So it's just one thing . If you want to know more Anaconda, You can refer to
Anaconda official API <https://conda.io/docs/test-drive.html>, Friendship tips : It's a foreign language !

1) Download it on the official website first ,Anaconda Official download address <https://www.continuum.io/downloads/>




If you dislike downloading too much on the official website slow, Tsinghua University image network <http://mirrors.tuna.tsinghua.edu.cn/help/anaconda/>
, Here's what you want Anaconda image .




Note version , Now the most stable thing is 4.3.0 Of Anaconda, It comes with it Python3.6

And then it's easy to install !

Now let's turn on the terminal , input conda - -version




We see the version is 4.3.8




2) because tensorflow The most suitable version is python3.5, So we can't use it Anaconda Self contained 3.6 Of , Here we want to download 3.5 Version of Python

Input at terminal conda create - -name tensorflow python=3.5.2, What I use here is 3.5.2, You can choose




then , It's all installed .




3) See here , It's a little chicken cold in my heart , Follow the prompts , activation tensorflow Environmental Science :activate tensorflow




The parentheses before it indicate that the current environment is tensorflow, See here , You've got the preparations ready .

4) You can exit the current environment :deactivate tensorflow




5) of course , You can be right tensorflow Environment switching :activate tensorflow, You can also view the current Python edition




If you want to play, play , See this , Your Anaconda Installation and tensorflow The preparatory work has been completed successfully ( There should be applause here !!!)


PS: We can see that Python We installed the version before 3.5.2, instead of Anaconda Self contained 3.6, This is crucial , Please make sure your Python edition .




<>2. install TensorFlow

emphasize : Here is Windows Based on Anaconda Of TensorFlow install ( Bloggers use W7)

Due to the simple notebook of the blogger , I choose cpu Version of TensorFlow Install .

1) Mode 1 : Choose the installation of official documents

pip install –ignore-installed –upgrade
https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.0.0-cp35-cp35m-win_x86_64.whl
If there's going to be a mistake here , Just choose one way

2) Mode 2 :pip install tensorflow

Then the blogger stuck his shell here countless times , Download to half , All of a sudden




Then it's hard to download tensorflow, When downloading several of its support packages , There's another exception




This is probably the reason for the request timeout , however , If you encounter this problem, don't be nervous , Every time I encounter this kind of problem , Reenter the above command :pip install tensorflow

3) Wait about three minutes , You will see this information :

And then :




4) notice Successfully installed, The blogger is full of tears , You can type python, Check if the version is 3.5.2




<>3. Here comes the point


1) Many children's shoes are installed here , Think of yourself and the successful installation TensorFlow, in fact , You did and successfully installed TensorFlow, Open your Anaconda folder , stay envs You can see under the folder tensorflow Environment of has been added




2) And then you open it up Spyder Ready to write your Hello TensorFlow, A sudden mistake caught you by surprise .


Obviously not in your environment tensorflow this module( modular ), But please pay attention to your Python Environmental Science , This is yours Python by 3.6, Obviously Anaconda Self contained , Now you finally remember what you were asked to download Python3.5.2 Yeah !




So you need to run TensorFlow Based on Python3.5.2 Of Spyder, This is also the most headache for bloggers , Because for that , Bloggers don't spend less time looking up information .




3) install TensorFlow Environmental Spyder plug-in unit

first , You need access Anaconda Prompt-python inside , Then activate TensorFlow, Import TensorFlow, Finally, we can confirm your Python edition .

click Anaconda Prompt-python, Here :




input activate tensorflow, Import import tensorflow as tf, inspect Python edition




next , You enter Anaconda Navigator( opening menu ->Anaconda 3->Anaconda
Navigator), be careful , current Application Column is root, that is Anaconda Root of , The environment is Python3.6.




therefore , You need to switch to TensorFlow below , Then install Spyder, You can also choose to install qtconsole,notebook, perhaps orange.




be careful , I have installed it here ( The blog is written after installation ), The first time you install it, it should be install




4) Exciting Hello TensorFlow

open Spyder, Write down our first Hello .




The long lost string in the console made the blogger burst into tears .







5) Different configurations Python Environment and plug-ins

Many children's shoes write machine learning algorithms , Used to use very stable Python2.7, Or other versions Python,Anaconda Allows you to create Python And plug-ins .

click Environment, There are create Button , Click to enter , New can be configured Python Environmental Science , You can see that I've already configured it here Python2.7







next , You can also follow the previous steps , For new Python Configure some IDE, This will greatly facilitate our preparation .




<>4. summary


It took almost a full day , I ordered a takeout at noon , So I worked with my iced coke late into the night ,windows The next installation makes me cry ( Don't , Don't ), however , Finally, thanks to all the netizens and csdn Information provided to me by friends of the Forum , Let me finish the wild version successfully TensorFlow install , Write this blog , I hope you can install it more smoothly , And save time and energy , Focus on the following TensorFlow content . Want to improve with bloggers , Welcome to private mail .

Some information :

TensorFlow Official installation API( Foreign language version ) <https://www.tensorflow.org/install/install_windows>

Geek College TensorFlow Translation ( Chinese version ) <http://wiki.jikexueyuan.com/project/tensorflow-zh/>

Some books on deep learning and machine learning ( Collected by Blogger ) <https://pan.baidu.com/s/1pL0jWRD#list/path=%2F>