Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll

在安装完tensorflow2.4之后,import tensorflow as tf出现了这个错误。
原因是因为我安装了cuda10.2以及配套的cudnn,而tensorflow是没有任何一个版本官方支持10.2的。https://tensorflow.google.cn/install/source_windows

image.png

而对于我来说,我只有cudart64_102.dll,而没有cudart64_110.dll。
因此,我的解决方式就是卸载cuda10.2并重新安装cuda11.0(以及配套的cudnn)。
下面是tensorflow gpu测试代码。

import tensorflow as tf
print(tf.config.list_physical_devices('GPU'))

安装完之后就没有报错了。


image.png
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容