1

我试图用本手册开始tensorflow https://www.tensorflow.org/install/install_windows所有安装成功完成,即时使用python 3.5.2和最新版本的pip,遇到此错误,任何人都可以解释我应该怎么做我做?TensorFlow导入错误:TensorFlow导入错误

enter code here Traceback (most recent call last): File "C:\Users\parth\AppData\Local\Programs\Python\Python35\lib\site-p tensorflow\python\pywrap_tensorflow.py", line 18, in swig_import_helper return importlib.import_module(mname) File "C:\Users\parth\AppData\Local\Programs\Python\Python35\lib\import it__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 986, in _gcd_import File "", line 969, in _find_and_load File "", line 958, in _find_and_load_unlo File "", line 666, in _load_unlocked File "", line 577, in module_from_spec File "", line 906, in create_mod File "", line 222, in _call_with_frames_r ImportError: DLL load failed: %1 is not a valid Win32 application. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\parth\AppData\Local\Programs\Python\Python35\lib\site-p tensorflow\python__init__.py", line 66, in from tensorflow.python import pywrap_tensorflow File "C:\Users\parth\AppData\Local\Programs\Python\Python35\lib\site-p tensorflow\python\pywrap_tensorflow.py", line 21, in _pywrap_tensorflow = swig_import_helper() File "C:\Users\parth\AppData\Local\Programs\Python\Python35\lib\site-p tensorflow\python\pywrap_tensorflow.py", line 20, in swig_import_helper return importlib.import_module('_pywrap_tensorflow') File "C:\Users\parth\AppData\Local\Programs\Python\Python35\lib\import it__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ImportError: No module named '_pywrap_tensorflow' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in File "C:\Users\parth\AppData\Local\Programs\Python\Python35\lib\site-p tensorflow__init__.py", line 24, in from tensorflow.python import * File "C:\Users\parth\AppData\Local\Programs\Python\Python35\lib\site-p tensorflow\python__init__.py", line 72, in raise ImportError(msg) ImportError: Traceback (most recent call last): File "C:\Users\parth\AppData\Local\Programs\Python\Python35\lib\site-p tensorflow\python\pywrap_tensorflow.py", line 18, in swig_import_helper return importlib.import_module(mname) File "C:\Users\parth\AppData\Local\Programs\Python\Python35\lib\import it__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 986, in _gcd_import File "", line 969, in _find_and_load File "", line 958, in _find_and_load_unlo File "", line 666, in _load_unlocked File "", line 577, in module_from_spec File "", line 906, in create_mod File "", line 222, in _call_with_frames_r ImportError: DLL load failed: %1 is not a valid Win32 application. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\parth\AppData\Local\Programs\Python\Python35\lib\site-p tensorflow\python__init__.py", line 66, in from tensorflow.python import pywrap_tensorflow File "C:\Users\parth\AppData\Local\Programs\Python\Python35\lib\site-p tensorflow\python\pywrap_tensorflow.py", line 21, in _pywrap_tensorflow = swig_import_helper() File "C:\Users\parth\AppData\Local\Programs\Python\Python35\lib\site-p tensorflow\python\pywrap_tensorflow.py", line 20, in swig_import_helper return importlib.import_module('_pywrap_tensorflow') File "C:\Users\parth\AppData\Local\Programs\Python\Python35\lib\import it__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ImportError: No module named '_pywrap_tensorflow' Failed to load the native TensorFlow runtime. See https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3do arted/os_setup.md#import_error for some common reasons and solutions. Include the entire stack trace above this error message when asking for help.

+1

你可能要重新粘贴您的追踪,所以它更具有可读性。这里有最后一个评论的潜在解决方案https://github.com/tensorflow/models/issues/97 –

+0

这个问题的重复 - http://stackoverflow.com/questions/43370953/error-while-import-tensorflow - 模/ 43566463#43566463 – DropHit

回答