【问题标题】:Trying to install TensorFlow- GPU...failed with ImportError: DLL load failed: The specified module could not be found尝试安装 TensorFlow-GPU...失败并出现 ImportError:DLL 加载失败:找不到指定的模块
【发布时间】:2019-02-28 00:15:45
【问题描述】:

我正在尝试安装 TensorFlow GPU 1.12.0(使用 pip),我正在使用 cuda 9.0、Windows 10、python 3.6、nvidia GTX 1080。我遇到了 ImportError。 谁能指导我?谢谢!

ImportError: Traceback (most recent call last):
  File "C:\Users\station\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "C:\Users\station\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "C:\Users\station\venv\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "C:\Users\station\venv\lib\imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "C:\Users\station\venv\lib\imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: DLL load failed: The specified module could not be found.


Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/errors

for some common reasons and solutions.  Include the entire stack trace
above this error message when asking for help.

【问题讨论】:

    标签: python tensorflow


    【解决方案1】:

    嘿兄弟,尝试在他的 1.5 版上安装 tensorflow

    pip install --upgrade --ignore-installed tensorflow-gpu==1.5 他的版本是兼容的

    【讨论】:

      【解决方案2】:

      tensorflow 1.12.0 +Python 3.6.0 + win10 似乎存在一些问题

      使用 conda tensorflow 工作正常。

      以下步骤适用于 pip tensorflow。

      卸载 tensorflow 将你的 python 版本替换为 3.6.1 安装最新版本的 tensorflow(1.13.0)

      要安装 Tensorflow,请点击以下链接:- https://www.tensorflow.org/install/pip

      【讨论】:

        【解决方案3】:

        这对我有用:

        1. Python 3.6.0
        2. tensorflow-gpu 1.13.0rc2
        3. protobuf 3.6.0
        4. CUDA 10.0 工具包
        5. cuDNN 10.0

        【讨论】:

          【解决方案4】:

          感谢大家分享您的回复。我能够通过向我的环境变量添加正确的 cuda 路径来解决这个问题。具体来说,我在环境中添加了 cuda、libinclude 文件夹,并且能够成功导入 TensorFlow。

          【讨论】:

            猜你喜欢
            • 1970-01-01
            • 2016-10-02
            • 1970-01-01
            • 2013-12-10
            • 2017-11-14
            • 2020-12-01
            • 2016-08-19
            • 2016-08-22
            相关资源
            最近更新 更多