Tensorflow导入

时间:2019-02-20 11:27:52

标签: python tensorflow

每当我尝试为gpu导入tensorflow时,都会出现此问题。 请帮忙。 我有NVIDIA GTX 1080 GPU。


ImportError: Traceback (most recent call last):
    File "C:\Users\Daniel\Anaconda3\lib\site-     packages\tensorflow\python\pywrap_tensorflow.py
", line 58, in <module>

from tensorflow.python.pywrap_tensorflow_internal import *
  File "C:\Users\Daniel\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_in
ternal.py", line 28, in <module>

_pywrap_tensorflow_internal = swig_import_helper()
  File "C:\Users\Daniel\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_in
ternal.py", line 24, in swig_import_helper

_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "C:\Users\Daniel\Anaconda3\lib\imp.py", line 242, in load_module
    return load_dynamic(name, filename, file)
  File "C:\Users\Daniel\Anaconda3\lib\imp.py", line 342, in load_dynamic
    return _load(spec)

ImportError: DLL load failed: The specified module could not be found.

1 个答案:

答案 0 :(得分:0)

似乎您正在Windows上运行,请尝试在下面安装:

conda install cudatoolkit
conda install cudnn

您可以检查是否安装了cudnn 7.x和cuda 9.0吗?