Install TesnsorFlow 2.x using Anaconda under Windows

Author | Vlad
Source | Vlad (Public Account: fulade_me)

Download Anaconda

First open the Anaconda official website to find the bottom of the page. Since the latest Anaconda supports Python3.8 version, and TesnorFlow supports up to Python3.7, I specifically checked the time when Python3.8 was released, so we need to click on the page to achrivefind the historical version download.
2020_12_19_conda_0
Click to enter the historical version page of Anaconda, we directly search 2020-10-15, find Anaconda2-2019.10-Windows-x86_64.exeand download it.

2020_12_19_conda_1

Install Anaconda

After the download is complete, we can directly double-click the installation file to start the installation, and click all the way in the middle Next
.
2020_12_19_conda_2

Set up domestic mirror source

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

After installation is complete, we click Windowsthe button, you will see there is a Anaconda3(64-bit)folder that's what we installed Anaconda, and then we click on the Anaconda Powershell Promptcommand-line tool.
2020_12_19_conda_3

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/
# 设置搜索时显示通道地址
conda config --set show_channel_urls yes

That's it.
For more condausage methods, you can check the second half of my previous blog

You can use the command to display the added source conda config --showin the channelsfield

Start installing TensorFlow

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

conda install tensorflow

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

test

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

import tensorflow as tf
tf.__version__

Seeing the output 2.1.0shows that our installation is correct.
Note that since TensorFlow is also constantly upgrading, the output here does not necessarily have to be 2.1.0output 2.x.
2020_12_19_conda_5


the public

Guess you like

Origin blog.51cto.com/13824996/2567418
Recommended