2017-08-15 3 views
-1

Jeder, bitte hilf mir.Ich habe versucht, Tensorflow zu tun, aber einige Fehler aufgetreten

Meine Umgebung ist Windows10, Anaconda4.4.0, Python 3.5.4.

Ich installierte Tensorflow und

import tensorflow as tf 

diesen Code eingegeben haben. Aber ,

>>> import tensorflow as tf 
Traceback (most recent call last): 
    File "C:\Anaconda3\envs\tf1\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper 
    return importlib.import_module(mname) 
    File "C:\Anaconda3\envs\tf1\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: 指定されたモジュールが見つかりません。 

During handling of the above exception, another exception occurred: 

Traceback (most recent call last): 
    File "C:\Anaconda3\envs\tf1\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 41, in <module> 
    from tensorflow.python.pywrap_tensorflow_internal import * 
    File "C:\Anaconda3\envs\tf1\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in <module> 
    _pywrap_tensorflow_internal = swig_import_helper() 
    File "C:\Anaconda3\envs\tf1\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\tf1\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\tf1\lib\site-packages\tensorflow\__init__.py", line 24, in <module> 
    from tensorflow.python import * 
    File "C:\Anaconda3\envs\tf1\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module> 
    from tensorflow.python import pywrap_tensorflow 
    File "C:\Anaconda3\envs\tf1\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\tf1\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helper 
    return importlib.import_module(mname) 
    File "C:\Anaconda3\envs\tf1\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: 指定されたモジュールが見つかりません。 

During handling of the above exception, another exception occurred: 

Traceback (most recent call last): 
    File "C:\Anaconda3\envs\tf1\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 41, in <module> 
    from tensorflow.python.pywrap_tensorflow_internal import * 
    File "C:\Anaconda3\envs\tf1\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in <module> 
    _pywrap_tensorflow_internal = swig_import_helper() 
    File "C:\Anaconda3\envs\tf1\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\tf1\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. 

sah ich eine Menge von Websites, und versucht, eine Menge Dinge zu tun. Das sind alles, was ich überprüft habe. Fitst, cublas64_80.dll, nvblas64_80.dll, cudnn64_5.dll sind in

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin

Und diese Lage eingestellt sind als "PATH" ilocated.

Was soll ich tun? Bitte hilf mir. Danke.

+0

Tensorflow Version bitte. Versuchen Sie auch: https://gist.github.com/mrry/ee5dbcfdd045fa48a27d56664411d41c – JCooke

+0

@JCooke Vielen Dank für Ihre Antwort! Tensorflow Version ist 1.2.1. Ah ... Es tut mir leid, aber ich möchte dir weitere Fragen stellen. Wie kann ich die Quelle, die Sie mir gezeigt haben, ausführen? Ich weiß nicht, wo ich die Quelldatei platzieren soll. – Saisen

+0

Versuchen Sie den obigen Link und sehen Sie, welches Ergebnis Sie erhalten, bitte – JCooke

Antwort

-1

Ich wette, Sie haben TensorFlow installiert ist eine andere virtuelle Python-Umgebung.

zu beheben: Öffnen Sie ein Conda Terminal * Offene AnacondaNavigator * Registerkarte Umgebung * Grüner Pfeil durch Umgebungsnamen * Offene Klemme

Im Terminal Hit> "Conda -c Conda-Schmiede tensorflow installieren" Beobachten Sie die Installation, schließen Sie das Terminal, öffnen Sie Ihr Notebook neu, und es sollte funktionieren.

+0

Vielen Dank für Ihre Antwort! mir ist es gelungen !! – Saisen

+0

Beachten Sie, dass Ihre Version von Tensorflow nicht offiziell unterstützt wird, wenn Sie über Conda und nicht über Pip installieren. Sie können immer noch mit pip in einer Conda-Umgebung installieren und es wird sichergestellt, dass Sie die neueste Version direkt von Google und keine Community-Version von Conda! Viel Glück! – JCooke

+0

Schön, bitte stimme meine Antwort ab. Verzweifelt, um meinen Reiseleiter zu bekommen! –

Verwandte Themen