加载 tensorflow 时出错 - 找不到 "cudart64_80.dll"

Error loading tensorflow - Could not find "cudart64_80.dll"

我正在尝试导入 tensorflow(使用 GPU)并不断收到以下错误:

ImportError: Could not find 'cudart64_80.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable

设置:

环境变量:

我还在 %PATH% 变量中添加了以下内容:

我错过了什么?为什么它找不到 cudart64_80.dll 尽管其位置已在 %PATH%?

中明确指定

如有任何帮助,我们将不胜感激。

在某些情况下,您可能需要重新启动计算机才能传播所有更改。

如果您使用的是 intellij 或 pycharm,请确保重新启动它,否则它可能无法采用正确的路径环境变量。

我遇到了类似的问题,但我的机器上的版本是 9.1。

缺少 'cudart64_90.dll',而有 'cudart64_91.dll'。所以我从 CUDA 9.1 到 9.0 做了一个 'downgrade',它解决了我的问题。希望对你有帮助。

我刚刚将 cudart64_90 更改为 cudart64_80。有效