运行tensorflow遇到Could not load dynamic library ‘cudart64_101.dll’; dlerror: cudart64_101.dll not found

  1. tensorflow版本需要和cuda版本匹配(版本查看)
  2. 报错提示哪个文件找不到就去百度搜索文件名下载后放到cuda的bin文件夹下

例:运行tensorflow时显示

2022-01-22 21:35:55.771251: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found
2022-01-22 21:35:55.771394: 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.

  1. 提示没有找到cudart64_101.dll(后三个数是101,说明需要下载10.1版本,110,102等同理),搜索该文件进行下载: 

运行tensorflow遇到Could not load dynamic library ‘cudart64_101.dll’; dlerror: cudart64_101.dll not found_第1张图片

下载后解压将该文件安装到cuda的bin文件夹下:

运行tensorflow遇到Could not load dynamic library ‘cudart64_101.dll’; dlerror: cudart64_101.dll not found_第2张图片

 然后再次运行:

2022-01-22 21:42:21.603622: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudart64_101.dll

 问题解决!

你可能感兴趣的:(问题已解决,tensorflow,人工智能,python)