type
status
data
slug
summary
tags
category
password
icon
Could not load dynamic library ‘libcudart.so.10.0‘
出现问题的原因
根本原因在于CUDA版本(10.1)和TensorFlow版本(1.14.0)不一致造成的。因为最新的CUDA版本已经更新到10.1+,但是TensorFlow最新只支持到10.0,所以才会出现各种找不到10.0的库。为什么耗费了这么久?因为CUDA很狡猾,在用nvcc -V命令查看时,给出的版本号是10.0,但用watch -n 1 nvidia -smi查询时,右上角显示的却是10.1。这里推荐用下面这个命令查询:
在其中找到cudatoolkit这一项,这个版本号是比较准确的。
解决办法
我这显示的cudatoolkit版本是10.1,因为需要10.0的版本,可以用如下命令直接覆盖安装
最后,再用conda list查询是否覆盖成功:

在改成10.0之后,代码应该就不会再出问题了。
原文链接