2017-08-27 78 views
0

我已经安装了tensorflow 1.3.0,如下所示,我已经在我的%PATH%中包含了cudnn64_6.dll以及安装的CUDA 8.0,但导入张量流时,我仍然收到错误信息。该错误消息是下面的安装消息后:升级到Tensorflow 1.3错误:DLL加载失败:找不到指定的模块

(tensorflow) C:\Users\alexz>pip install --ignore-installed --upgrade tensorflow-gpu 
Collecting tensorflow-gpu 
    Using cached tensorflow_gpu-1.3.0-cp36-cp36m-win_amd64.whl 
Collecting protobuf>=3.3.0 (from tensorflow-gpu) 
    Using cached protobuf-3.4.0-py2.py3-none-any.whl 
Collecting wheel>=0.26 (from tensorflow-gpu) 
    Using cached wheel-0.29.0-py2.py3-none-any.whl 
Collecting tensorflow-tensorboard<0.2.0,>=0.1.0 (from tensorflow-gpu) 
    Using cached tensorflow_tensorboard-0.1.5-py3-none-any.whl 
Collecting numpy>=1.11.0 (from tensorflow-gpu) 
    Using cached numpy-1.13.1-cp36-none-win_amd64.whl 
Collecting six>=1.10.0 (from tensorflow-gpu) 
    Using cached six-1.10.0-py2.py3-none-any.whl 
Collecting setuptools (from protobuf>=3.3.0->tensorflow-gpu) 
    Using cached setuptools-36.2.7-py2.py3-none-any.whl 
Collecting werkzeug>=0.11.10 (from tensorflow-tensorboard<0.2.0,>=0.1.0->tensorflow-gpu) 
    Using cached Werkzeug-0.12.2-py2.py3-none-any.whl 
Collecting html5lib==0.9999999 (from tensorflow-tensorboard<0.2.0,>=0.1.0->tensorflow-gpu) 
Collecting markdown>=2.6.8 (from tensorflow-tensorboard<0.2.0,>=0.1.0->tensorflow-gpu) 
Collecting bleach==1.5.0 (from tensorflow-tensorboard<0.2.0,>=0.1.0->tensorflow-gpu) 
    Using cached bleach-1.5.0-py2.py3-none-any.whl 
Installing collected packages: six, setuptools, protobuf, wheel, werkzeug, html5lib, markdown, bleach, numpy, tensorflow-tensorboard, tensorflow-gpu 
Successfully installed bleach-1.5.0 html5lib-0.9999999 markdown-2.6.9 numpy-1.13.1 protobuf-3.4.0 setuptools-36.2.7 six-1.10.0 tensorflow-gpu-1.3.0 tensorflow-tensorboard-0.1.5 werkzeug-0.12.2 wheel-0.29.0 

此外,我有蟒蛇3.6与蟒蛇,随后在tensorflow的网站说明安装一切。 错误消息:

Python 3.6.1 |Anaconda custom (64-bit)| (default, May 11 2017, 13:25:24) [MSC v.1900 64 bit (AMD64)] on win32 
Type "help", "copyright", "credits" or "license" for more information. 
>>> import tensorflow as tf 
Traceback (most recent call last): 
    File "C:\My_Items\Anaconda\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper 
    return importlib.import_module(mname) 
    File "C:\My_Items\Anaconda\lib\importlib\__init__.py", line 126, in import_module 
    return _bootstrap._gcd_import(name[level:], package, level) 
    File "<frozen importlib._bootstrap>", line 978, in _gcd_import 
    File "<frozen importlib._bootstrap>", line 961, in _find_and_load 
    File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked 
    File "<frozen importlib._bootstrap>", line 648, in _load_unlocked 
    File "<frozen importlib._bootstrap>", line 560, in module_from_spec 
    File "<frozen importlib._bootstrap_external>", line 922, in create_module 
    File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed 
ImportError: DLL load failed: The specified module could not be found. 

During handling of the above exception, another exception occurred: 

Traceback (most recent call last): 
    File "C:\My_Items\Anaconda\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 41, in <module> 
    from tensorflow.python.pywrap_tensorflow_internal import * 
    File "C:\My_Items\Anaconda\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in <module> 
    _pywrap_tensorflow_internal = swig_import_helper() 
    File "C:\My_Items\Anaconda\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper 
    return importlib.import_module('_pywrap_tensorflow_internal') 
    File "C:\My_Items\Anaconda\lib\importlib\__init__.py", line 126, in import_module 
    return _bootstrap._gcd_import(name[level:], package, level) 
ModuleNotFoundError: No module named '_pywrap_tensorflow_internal' 

During handling of the above exception, another exception occurred: 

Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
    File "C:\My_Items\Anaconda\lib\site-packages\tensorflow\__init__.py", line 24, in <module> 
    from tensorflow.python import * 
    File "C:\My_Items\Anaconda\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module> 
    from tensorflow.python import pywrap_tensorflow 
    File "C:\My_Items\Anaconda\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 52, in <module> 
    raise ImportError(msg) 
ImportError: Traceback (most recent call last): 
    File "C:\My_Items\Anaconda\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper 
    return importlib.import_module(mname) 
    File "C:\My_Items\Anaconda\lib\importlib\__init__.py", line 126, in import_module 
    return _bootstrap._gcd_import(name[level:], package, level) 
    File "<frozen importlib._bootstrap>", line 978, in _gcd_import 
    File "<frozen importlib._bootstrap>", line 961, in _find_and_load 
    File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked 
    File "<frozen importlib._bootstrap>", line 648, in _load_unlocked 
    File "<frozen importlib._bootstrap>", line 560, in module_from_spec 
    File "<frozen importlib._bootstrap_external>", line 922, in create_module 
    File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed 
ImportError: DLL load failed: The specified module could not be found. 

During handling of the above exception, another exception occurred: 

Traceback (most recent call last): 
    File "C:\My_Items\Anaconda\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 41, in <module> 
    from tensorflow.python.pywrap_tensorflow_internal import * 
    File "C:\My_Items\Anaconda\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in <module> 
    _pywrap_tensorflow_internal = swig_import_helper() 
    File "C:\My_Items\Anaconda\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper 
    return importlib.import_module('_pywrap_tensorflow_internal') 
    File "C:\My_Items\Anaconda\lib\importlib\__init__.py", line 126, in import_module 
    return _bootstrap._gcd_import(name[level:], package, level) 
ModuleNotFoundError: No module named '_pywrap_tensorflow_internal' 


Failed to load the native TensorFlow runtime. 

See https://www.tensorflow.org/install/install_sources#common_installation_problems 

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

更新:当我重新命名cudnn64_6.dll到cudnn64_5.dll它的工作原理,但是当我检查的版本是1.2.1,而不是1.3.0,虽然我下载tensorflow 1.3。 0。如果我使用cudnn64_6.dll,错误消息会回来。非常混乱的问题。 – aldnoah

回答

0

我得到了同样的问题,而安装Tensorflow 1.3一个月前。 我通过安装CudNN 5.1而不是6来修复它。

注意:我刚刚看到最新版本是7,也许它有效(我还没试过)。

我希望它能帮助,

相关问题