[TensorFlow] 运行报错:W tensorflowstream_executorplatformdefaultdso_loader.cc59]

[TensorFlow] 运行报错:W tensorflow/stream_executor/platform/default/dso_loader.cc:59]

问题描述

使用官网的命令下载TensorFlow没有出现问题

pip install tensorflow

但是运行时出现报错信息:

2020-09-20 21:31:45.455714: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory
2020-09-20 21:31:45.455738: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.

问题分析

看报错信息也能看出来时GPU的问题。

查阅资料后时GPU的版本与TensorFlow的版本不一致。

对应关系参见:https://tensorflow.google.cn/install/source#gpu

版本Python 版本编译器构建工具cuDNNCUDA
tensorflow-2.1.02.7、3.5-3.7GCC 7.3.1Bazel 0.27.17.610.1
tensorflow-2.0.02.7、3.3-3.7GCC 7.3.1Bazel 0.26.17.410.0
tensorflow_gpu-1.14.02.7、3.3-3.7GCC 4.8Bazel 0.24.17.410.0
tensorflow_gpu-1.13.12.7、3.3-3.7GCC 4.8Bazel 0.19.27.410.0
tensorflow_gpu-1.12.02.7、3.3-3.6GCC 4.8Bazel 0.15.079
tensorflow_gpu-1.11.02.7、3.3-3.6GCC 4.8Bazel 0.15.079
tensorflow_gpu-1.10.02.7、3.3-3.6GCC 4.8Bazel 0.15.079
tensorflow_gpu-1.9.02.7、3.3-3.6GCC 4.8Bazel 0.11.079
tensorflow_gpu-1.8.02.7、3.3-3.6GCC 4.8Bazel 0.10.079
tensorflow_gpu-1.7.02.7、3.3-3.6GCC 4.8Bazel 0.9.079
tensorflow_gpu-1.6.02.7、3.3-3.6GCC 4.8Bazel 0.9.079
tensorflow_gpu-1.5.02.7、3.3-3.6GCC 4.8Bazel 0.8.079
tensorflow_gpu-1.4.02.7、3.3-3.6GCC 4.8Bazel 0.5.468
tensorflow_gpu-1.3.02.7、3.3-3.6GCC 4.8Bazel 0.4.568
tensorflow_gpu-1.2.02.7、3.3-3.6GCC 4.8Bazel 0.4.55.18
tensorflow_gpu-1.1.02.7、3.3-3.6GCC 4.8Bazel 0.4.25.18
tensorflow_gpu-1.0.02.7、3.3-3.6GCC 4.8Bazel 0.4.25.18

我用的是CUDA 10.0,对应TensorFlow版本应为 tensorflow-2.0.0

解决方案

下载对应的TensorFlow版本

pip install tensorflow==2.0.0 -i https://pypi.tuna.tsinghua.edu.cn/simple

下载后正常!

在这里插入图片描述

评论 58
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值