<>TensorFlow staywindows Installation below
Preface： from2015 Google willtensorflow After open source, This powerful artifact for deep learningCaffe,Keras,Torch7 Wait until all the people are killed,github Upperstar andfork 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 officialAPI, 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, Know about, forum, I finally built mytensorflow Environmental Science, And finally wrote my“Hello
TensorFlow!”. Although the blogger has been involvedlinux, But the blogger's humble computer can't provide enough memory on the virtual machine, So I decided to take the risk, Build onwindows Version of wildtensorflow.
Another sentence： This article is for those who want to buildtensorflow Put forward feasible scheme of children's shoes, I just want to fill in the hole for you with the experience of the blogger, Put you in light, Focus on later learning.
tensorflow Based onpython Script language, Is an advanced application, It must rely on the underlying application to play a role. So it needs to be installedpython, Of course, it needs to be installednumpy,scipy,six,matplotlib Wait for dozens of expansion packages. If you install one by one, Very time consuming, But now there's an integrated environmentanaconda, Easy to install.python Most of the expansion packs for, Are integrated inanaconda Inside. So it's just one thing. If you want to know moreAnaconda, Can refer to
Anaconda OfficialAPI <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 websiteslow, Tsinghua University image network <http://mirrors.tuna.tsinghua.edu.cn/help/anaconda/>
, Here's what you wantAnaconda image.
Attention version, Now the most stable thing is4.3.0 OfAnaconda, It comes with itself.Python3.6
And then it's easy to install!
Now let's turn on the terminal, inputconda - -version
We see the version is4.3.8
2） Becausetensorflow The most suitable version ispython3.5, So we can't use itAnaconda Self contained3.6 Of, Here we want to download3.5 EditionPython
Input at terminal conda create - -name tensorflow python=3.5.2, What I use here is3.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, activationtensorflow Environmental Science：activate tensorflow
The parentheses before it indicate that the current environment istensorflow, 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 currentPython Edition
If you want to play, play, See this, YourAnaconda Installation andtensorflow The preparatory work has been completed successfully（ There should be applause here!!!）
PS： We can see thatPython We installed the version before3.5.2, Instead ofAnaconda Self contained3.6, This is crucial, Please make sure yourPython Edition.
Emphasize： Here isWindows Based onAnaconda OfTensorFlow install（ Bloggers useW7）
Due to the simple notebook of the blogger, I choosecpu EditionTensorFlow Installation.
1） One way： Choose the installation of official documents
pip install –ignore-installed –upgrade
If there's going to be a mistake here, Just choose one way
2） Mode two：pip install tensorflow
Then the blogger stuck his shell here countless times, Download to half, All of a sudden
Then it's hard to downloadtensorflow, 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：
4） noticeSuccessfully installed, The blogger is full of tears, You can typepython, Check if the version is3.5.2
<>3. The key is coming.
1） Many children's shoes are installed here, Think of yourself and the successful installationTensorFlow, In fact, You did and successfully installedTensorFlow, Open yourAnaconda Folder, stayenvs You can see under the foldertensorflow Environment of has been added
2） And then you open it upSpyder Ready to write yourHello TensorFlow, A sudden mistake caught you by surprise.
Obviously not in your environmenttensorflow thismodule（ Modular）, But please pay attention to yourPython Environmental Science, This is yours.Python by3.6, ObviouslyAnaconda Self contained, Now you finally remember what you were asked to downloadPython3.5.2 Right.!
So you need to runTensorFlow Based onPython3.5.2 OfSpyder, This is also the most headache for bloggers, Because for that, Bloggers don't spend less time looking up information.
3） installTensorFlow EnvironmentSpyder Plug-in unit
First, You need accessAnaconda Prompt-python inside, Then activateTensorFlow, ImportTensorFlow, Finally, we can confirm yourPython Edition.
clickAnaconda Prompt-python, Here：
inputactivate tensorflow, Importimport tensorflow as tf, inspectPython Edition
Next, You enterAnaconda Navigator（ opening menu->Anaconda 3->Anaconda
Navigator）, Be careful, CurrentApplication Hurdle isroot, that isAnaconda Root of, The environment isPython3.6.
therefore, You need to switch toTensorFlow Below, Then installSpyder, You can also choose to installqtconsole,notebook, perhapsorange.
Be careful, I have installed it here（ The blog is written after installation）, The first time you install it, it should beinstall
4） ExcitingHello TensorFlow
openSpyder, Write down our firstHello .
The long lost string in the console made the blogger burst into tears.
5） Different configurationsPython Environment and plug-ins
Many children's shoes write machine learning algorithms, Used to use very stablePython2.7, Or other versionsPython,Anaconda Allows you to createPython And plug-ins.
clickEnvironment, Below arecreate Button, Click to enter, New can be configuredPython Environmental Science, You can see that I've already configured it herePython2.7
Next, You can also follow the previous steps, As newPython Some configurationIDE, This will greatly facilitate our preparation.
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 andcsdn Information provided to me by friends of the Forum, Let me finish the wild version successfullyTensorFlow install, Write this blog, I hope you can install it more smoothly, And save time and energy, Focus on the followingTensorFlow content. Want to improve with bloggers, Welcome to private mail.
TensorFlow Official installationAPI（ Foreign language version） <https://www.tensorflow.org/install/install_windows>
Geek CollegeTensorFlow Translated version（ Chinese version） <http://wiki.jikexueyuan.com/project/tensorflow-zh/>
Some books on deep learning and machine learning（ Bloggers incorporated） <https://pan.baidu.com/s/1pL0jWRD#list/path=%2F>