win10安装Tensorflow2

**

win10安装Tensorflow2

**
一:安装Anaconda
步骤:

1:从官方网站下载Anaconda
https://www.anaconda.com/download/

win10安装Tensorflow2

2:进行软件安装
需要注意的一点是:第一个检查添加到系统环境变量中。

[En]

One thing to note: the first check is added to the system environment variable.

win10安装Tensorflow2

3:安装完成Anaconda之后进行环境变量的测试
进入到windows中的命令模式:

检测anaconda环境是否安装成功:conda –version

win10安装Tensorflow2
二:安装Tensorflow2
1、官网上(https://tensorflow.google.cn/install?hl=zh_cn)描述的系统要求:
win10安装Tensorflow2
以上文本中所需的可再分发程序包的链接:
[En]

The link to the redistributable package required in the above text:

https://docs.microsoft.com/zh-CN/cpp/windows/latest-supported-vc-redist?view=msvc-170

2、安装步骤:
在要安装的命令行中输入以下说明:

[En]

Enter the following instructions on the command line to install:

pip3 install –user –upgrade tensorflow
注意:网速过慢可能会导致安装失败,可以重新输入说明重新安装。

[En]

Note: slow network speed may lead to installation failure, you can re-enter the instructions to reinstall.

安装成功后的部分显示:

win10安装Tensorflow2

win10安装Tensorflow2
3、验证是否安装成功
在开始菜单中打开Spyder:
win10安装Tensorflow2

测试代码:

import tensorflow as tf

tf.compat.v1.disable_eager_execution()

a = tf.constant(5.0)
b = tf.constant(7.0)
c = a * b

sess = tf.compat.v1.Session()

print(sess.run(c))

输出(dll加载错误是因为没有安装gpu部分,可忽略):

win10安装Tensorflow2

Original: https://blog.csdn.net/weixin_39108302/article/details/122811466
Author: weixin_39108302
Title: win10安装Tensorflow2

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/511380/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球