2017-08-24 71 views
1

我試圖用GPU的版本安裝tensorflow,但總是失敗。tensorflow:沒有名爲'_pywrap_tensorflow_internal'的模塊

計算機系統:贏得10專業

顯卡:的NVIDIA Quadro M2000M(我確認此卡Nvidia的官方網站,它可以支持CUDA)

我的安裝過程:

1-安裝快速環境編輯器

2-安裝DXSDK_Jun10.exe

3-安裝cuda_8.0.61 \貼片2的d CUDNN5.1

4-安裝Visual Studio 2015年社會

然後,我測試在VS2015的例子。

enter image description here

5安裝蟒蛇4.4(我也嘗試了視力4.2,但它是沒有什麼用)

6-創建暢達環境命名tensorflow並安裝python3.5

7激活暢達環境和安裝tensorflow的GPU版本

pip install --ignore-installed –upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-1.3.0-cp35-cp35m-win_amd64.whl 

直到我完成這些步驟後,我沒有收到紐約錯誤通知,但是當我輸入「進口tensorflow爲TF」,它注意到我說:

(tensorflow) C:\Users\Vincent>python 
Python 3.5.4 |Continuum Analytics, Inc.| (default, Aug 14 2017, 13:41:13) [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:\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper 
    return importlib.import_module(mname) 
    File "C:\Anaconda3\envs\tensorflow\lib\importlib\__init__.py", line 126, in import_module 
    return _bootstrap._gcd_import(name[level:], package, level) 
    File "<frozen importlib._bootstrap>", line 985, in _gcd_import 
    File "<frozen importlib._bootstrap>", line 968, in _find_and_load 
    File "<frozen importlib._bootstrap>", line 957, in _find_and_load_unlocked 
    File "<frozen importlib._bootstrap>", line 666, in _load_unlocked 
    File "<frozen importlib._bootstrap>", line 577, in module_from_spec 
    File "<frozen importlib._bootstrap_external>", line 938, in create_module 
    File "<frozen importlib._bootstrap>", line 222, 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:\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 41, in <module> 
    from tensorflow.python.pywrap_tensorflow_internal import * 
    File "C:\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in <module> 
    _pywrap_tensorflow_internal = swig_import_helper() 
    File "C:\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper 
    return importlib.import_module('_pywrap_tensorflow_internal') 
    File "C:\Anaconda3\envs\tensorflow\lib\importlib\__init__.py", line 126, in import_module 
    return _bootstrap._gcd_import(name[level:], package, level) 
ImportError: 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:\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\__init__.py", line 24, in <module> 
    from tensorflow.python import * 
    File "C:\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module> 
    from tensorflow.python import pywrap_tensorflow 
    File "C:\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 52, in <module> 
    raise ImportError(msg) 
ImportError: Traceback (most recent call last): 
    File "C:\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper 
    return importlib.import_module(mname) 
    File "C:\Anaconda3\envs\tensorflow\lib\importlib\__init__.py", line 126, in import_module 
    return _bootstrap._gcd_import(name[level:], package, level) 
    File "<frozen importlib._bootstrap>", line 985, in _gcd_import 
    File "<frozen importlib._bootstrap>", line 968, in _find_and_load 
    File "<frozen importlib._bootstrap>", line 957, in _find_and_load_unlocked 
    File "<frozen importlib._bootstrap>", line 666, in _load_unlocked 
    File "<frozen importlib._bootstrap>", line 577, in module_from_spec 
    File "<frozen importlib._bootstrap_external>", line 938, in create_module 
    File "<frozen importlib._bootstrap>", line 222, 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:\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 41, in <module> 
    from tensorflow.python.pywrap_tensorflow_internal import * 
    File "C:\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in <module> 
    _pywrap_tensorflow_internal = swig_import_helper() 
    File "C:\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper 
    return importlib.import_module('_pywrap_tensorflow_internal') 
    File "C:\Anaconda3\envs\tensorflow\lib\importlib\__init__.py", line 126, in import_module 
    return _bootstrap._gcd_import(name[level:], package, level) 
ImportError: 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. 

我已經修改環境變量如下:(?也許是環境有一些麻煩)

\ Anaconda3 \ ENVS \ tensorflow \ LIB \ sitepackages \ tensorflow \蟒\

\ Anaconda3 \ ENVS \ tensorflow \ LIB \ sitepackages \ tensorflow \ python__pycache __ \

\ Anaconda3 \ LIB \站點包\ tensorflow \ python的\

\ Anaconda3 \ LIB \站點包\ tensorflow \ python__pycache __ \

\ Anaconda3 \ ENVS \ tensorflow \ LIB \站點包\ tensorflow \

任何人都有任何想法是什麼問題以及如何解決它。非常感謝

回答

1

如果您要安裝版本1.3.0,則需要使用cuDNN 6而不是5.1。如果您按照網站上的說明操作,那麼這可能是您錯誤地列出5.1作爲cuDNN版本的原因。但是,如果你有興趣,這個問題正在這裏討論:https://github.com/tensorflow/tensorflow/issues/11784

如果你仍然有問題,然後運行這個腳本,讓我知道答覆。我將編輯我的答案以適應。 - > mrry's Self-check Script

相關問題