tensorflow2: Failed to load the native TensorFlow runtime win10安装tensorflow2.1_CPU版

安装TF2 CPU

安装tensorflow2 CPU版,真的很简单,很简单。可还是折腾了一下午
官方给的安装方法

我是使用conda新建一个环境,建议python3.6,避免不必要的麻烦。

conda create --name tf2_1 python=3.6
conda activate tf2_1

安装适用于Visual Studio 2015、2017 和 2019 的 Microsoft Visual C++可再发行软件包。从 TensorFlow 2.1.0 版开始,此软件包需要 msvcp140_1.dll 文件(旧版可再发行软件包可能不提供此文件)。 下载地址
在这里插入图片描述

记住是这个2015-2019通用版本。

pip install tensroflow-cpu

配置源,或者科学上网来加快速度。
最后测试一下

import tensorflow as tf

A = tf.constant([[1, 2], [3, 4]])
B = tf.constant([[5, 6], [7, 8]])
C = tf.matmul(A, B)

print(C)

在这里插入图片描述
中间那个提示是指令集问题,问题不大。

Failed to load the native TensorFlow runtime.

有人会碰到DLL加载错误,把Visual Studio 2015、2017 和 2019 的 Microsoft Visual C++装上就好了。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值