Installing tesnsorflow 2. X with Anaconda under Windows

Time:2021-9-11

By Vlad
Source Vlad (official account: fulade_me)

Download Anaconda

First openAnaconda official websiteFind the bottom of the page. Since the latest Anaconda supports Python 3.8, and tesnorflow supports Python 3.7, I specially checked the release time of Python 3.8, so we need to click theachriveFind the historical version to download.
Installing tesnsorflow 2. X with Anaconda under Windows
Click to enter the historical version page of anaconda. We directly search 2020-10-15 and findAnaconda2-2019.10-Windows-x86_64.exeJust download it.

Installing tesnsorflow 2. X with Anaconda under Windows

Install Anaconda

After downloading, we can directly double-click the installation file to start the installation, and click all the way in the middle processNext
Just.
Installing tesnsorflow 2. X with Anaconda under Windows

Set domestic image source

Due to network problems, I need to add a domestic Tsinghua image source here, which will facilitate us to download resources more quickly.

After the installation, we clickWindowsButton, you will see aAnaconda3(64-bit)This is the folder we installedAnacondaThen we clickAnaconda Powershell PromptCommand line tools.
Installing tesnsorflow 2. X with Anaconda under Windows

After entering the command line tool, enter

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
#Set the channel address to be displayed when searching
conda config --set show_channel_urls yes

That’s it.
addedcondaUsing this method, you can view myThe second half of the last blog post

You can use commandsconda config --show, inchannelsField displays the source that has been added

Begin installing tensorflow

We just need to type in the command line tool opened in the previous step

conda install tensorflow

That’s it.
Since we have configured the domestic image source, the installation can be completed soon.

test

After the installation is completed, we then enter in the open command line tool

import tensorflow as tf
tf.__version__

See output2.1.0That means our installation is correct.
be carefulSince tensorflow is also constantly upgrading, the output here is not necessarily if2.1.0output2.xThat’s what I’m fighting for.
Installing tesnsorflow 2. X with Anaconda under Windows


Installing tesnsorflow 2. X with Anaconda under Windows