Python tensorflow安装出现的问题

Python tensorflow安装出现的问题

错误报告:

(base) C:\Users\Administrator.WIN-BE456U10DAB>python
Python 3.7.6 (default, Jan 8 2020, 20:23:39) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type “help”, “copyright”, “credits” or “license” for more information.

import tensorflow as tf
2020-10-10 11:06:07.154413: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library ‘cudart64_101.dll’; dlerror: cudart64_101.dll not found
2020-10-10 11:06:07.162917: 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.

出现原因不明,本人电脑python版本3.7.6,安装tensorflow2.3的过程中出现了以上问题。

问题成因:

CUDART64_101.DLL,文件描述:NVIDIA CUDA运行时,版本10.1.243
与cudart64_101.dll相关的错误可能由于几种不同的原因而出现。例如,错误的应用程序,cudart64_101.dll被删除或放错位置,被您PC上存在的恶意软件破坏或损坏的Windows注册表。

最常见的错误消息是:

该程序无法启动,因为您的计算机缺少cudart64_101.dll。尝试重新安装该程序以解决此问题。
启动cudart64_101.dll出现问题。指定的模块无法找到。
加载cudart64_101.dll发生错误。指定的模块无法找到。
由于找不到cudart64_101.dll,因此无法继续执行代码。重新安装该程序可能会解决此问题。
cudart64_101.dll并非旨在在Windows上运行,或者包含错误。尝试使用原始安装媒体再次安装程序,或与系统管理员或软件供应商联系以获取支持。
在大多数情况下,解决方案是将PC上的cudart64_101.dll正确地重新安装到Windows系统文件夹中。或者,某些程序(尤其是PC游戏)需要将DLL文件放置在游戏/应用程序安装文件夹中。

解决方法:

1.下载cudart64_101.dll.html(看清楚的错误报告是不是这个文件)
Python tensorflow安装出现的问题
下载官方网址:https://www.dll-files.com/cudart64_101.dll.html

解压之后
第2步
将文件放在系统目录中。
默认情况下,这是

C:\Windows\System (Windows 95/98 / Me),

C:\WINNT\System32 (Windows NT / 2000),或

C:\Windows\System32 (Windows XP,Vista,7、8、8.1、10)。
在Windows的64位版本上,32位DLL文件的默认文件夹是C:\Windows\SysWOW64\ 和64位dll文件 的默认文件夹 C:\Windows\System32\ 。
确保覆盖所有现有文件(但要备份原始文件)。
重新启动计算机。
Python tensorflow安装出现的问题
这时候我就解决啦