2017-10-18 47 views
0

這是我得到的命令提示符下,當我試圖導入tensorflow到python3.5錯誤:當我安裝tensorflow-gpu版本時出現此錯誤。如何解決這個問題?

File "<stdin>", line 1, in <module>                                             
File "D:\S7\ml_spl\Anaconda2\envs\tensorflowGPU\lib\site- 
packages\tensorflow\__init__.py", line 24, in <module>                          
from tensorflow.python import *                                             
File "D:\S7\ml_spl\Anaconda2\envs\tensorflowGPU\lib\site- 
packages\tensorflow\python\__init__.py", line 49, in <module>                        
from tensorflow.python import pywrap_tensorflow                                         
File "D:\S7\ml_spl\Anaconda2\envs\tensorflowGPU\lib\site- 
packages\tensorflow\python\pywrap_tensorflow.py", line 52, in <module>                      
raise ImportError(msg)                                               
ImportError: Traceback (most recent call last):                                          
File "D:\S7\ml_spl\Anaconda2\envs\tensorflowGPU\lib\site- 
packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in 
swig_import_helper                 
return importlib.import_module(mname)                                            
File "D:\S7\ml_spl\Anaconda2\envs\tensorflowGPU\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 "D:\S7\ml_spl\Anaconda2\envs\tensorflowGPU\lib\site- 
packages\tensorflow\python\pywrap_tensorflow.py", line 41, in <module>                      
from tensorflow.python.pywrap_tensorflow_internal import *                                      
File "D:\S7\ml_spl\Anaconda2\envs\tensorflowGPU\lib\site- 
packages\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in 
<module>                    
_pywrap_tensorflow_internal = swig_import_helper()                                        
File "D:\S7\ml_spl\Anaconda2\envs\tensorflowGPU\lib\site- 
packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in 
swig_import_helper                 
return importlib.import_module('_pywrap_tensorflow_internal')                                      
File "D:\S7\ml_spl\Anaconda2\envs\tensorflowGPU\lib\importlib\__init__.py", 
line 126, in import_module                            
return _bootstrap._gcd_import(name[level:], package, level)                                      
ImportError: No module named '_pywrap_tensorflow_internal' 

我看到,當我試圖安裝tensorflow GPU上面的錯誤版本在安裝了python3.5和其他依賴項的anaconda環境中。有人能告訴我如何解決這個問題嗎?

回答

0

你安裝了cudnn 6.0和cuda 8嗎?這issue表明,要麼那些沒有正確安裝,或者你有錯誤的版本。什麼版本和步驟安裝用於GPU的支持

指令在tensorflow site

+0

我已經cudnn 7.0和CUDA 9.這是最新版本。他們是否造成我這種麻煩? –

+0

是的,tf將支持[版本1.4中的cudnn 7.0](https://github.com/tensorflow/tensorflow/blob/r1.3/RELEASE.md),但尚未在當前版本中(1.3) –

+0

什麼版本tensorflow-gpu你安裝了嗎? –

相關問題