尝试安装TensorFlow- GPU ...失败,出现ImportError:DLL加载失败:找不到指定的模块

时间:2019-02-28 00:15:46

标签: python tensorflow

我正在尝试安装TensorFlow GPU 1.12.0(使用pip),我正在使用cuda 9.0,Windows 10,python 3.6,nvidia GTX1080。我陷入了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.

4 个答案:

答案 0 :(得分:0)

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

pip install --upgrade --ignore安装的tensorflow-gpu == 1.5 他的版本兼容

答案 1 :(得分:0)

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

使用conda tensorflow正常工作。

以下步骤对我来说是pip tensorflow的工作。

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

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

答案 2 :(得分:0)

这对我有用:

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

答案 3 :(得分:0)

感谢大家分享您的回复。通过将正确的cuda路径添加到我的环境变量中,我能够解决此问题。具体来说,我将 cuda,lib include 文件夹添加到环境中,并能够成功导入TensorFlow。