2016-11-30 4 views
2

tensorflow의 Windows 지원을 매우 기뻤습니다. 나는 this 링크의 지침을 따르고 있습니다. 설치가 완료되었지만 가져 오는 동안 오류가 발생합니다. 내가 import tensorflow as tf하려고하면
는, 다음은 문제 해결에 대한 모든 포인터를 감상 할 수있다 역 추적
Windows 8에서 Tensorflow 설치가 작동하지 않습니다.

Traceback (most recent call last): 
    File "C:\Program Files\Python35\lib\site-packages\tensorflow\python\pywrap_ten 
sorflow.py", line 18, in swig_import_helper 
    return importlib.import_module(mname) 
    File "C:\Program Files\Python35\lib\importlib\__init__.py", line 126, in impor 
t_module 
    return _bootstrap._gcd_import(name[level:], package, level) 
    File "<frozen importlib._bootstrap>", line 986, in _gcd_import 
    File "<frozen importlib._bootstrap>", line 969, in _find_and_load 
    File "<frozen importlib._bootstrap>", line 958, 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 906, 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:\Program Files\Python35\lib\site-packages\tensorflow\python\__init__.p 
y", line 54, in <module> 
    from tensorflow.python import pywrap_tensorflow 
    File "C:\Program Files\Python35\lib\site-packages\tensorflow\python\pywrap_ten 
sorflow.py", line 21, in <module> 
    _pywrap_tensorflow = swig_import_helper() 
    File "C:\Program Files\Python35\lib\site-packages\tensorflow\python\pywrap_ten 
sorflow.py", line 20, in swig_import_helper 
    return importlib.import_module('_pywrap_tensorflow') 
    File "C:\Program Files\Python35\lib\importlib\__init__.py", line 126, in impor 
t_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 "<stdin>", line 1, in <module> 
    File "C:\Program Files\Python35\lib\site-packages\tensorflow\__init__.py", lin 
e 24, in <module> 
    from tensorflow.python import * 
    File "C:\Program Files\Python35\lib\site-packages\tensorflow\python\__init__.p 
y", line 60, in <module> 
    raise ImportError(msg) 
ImportError: Traceback (most recent call last): 
    File "C:\Program Files\Python35\lib\site-packages\tensorflow\python\pywrap_ten 
sorflow.py", line 18, in swig_import_helper 
    return importlib.import_module(mname) 
    File "C:\Program Files\Python35\lib\importlib\__init__.py", line 126, in impor 
t_module 
    return _bootstrap._gcd_import(name[level:], package, level) 
    File "<frozen importlib._bootstrap>", line 986, in _gcd_import 
    File "<frozen importlib._bootstrap>", line 969, in _find_and_load 
    File "<frozen importlib._bootstrap>", line 958, 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 906, 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:\Program Files\Python35\lib\site-packages\tensorflow\python\__init__.p 
y", line 54, in <module> 
    from tensorflow.python import pywrap_tensorflow 
    File "C:\Program Files\Python35\lib\site-packages\tensorflow\python\pywrap_ten 
sorflow.py", line 21, in <module> 
    _pywrap_tensorflow = swig_import_helper() 
    File "C:\Program Files\Python35\lib\site-packages\tensorflow\python\pywrap_ten 
sorflow.py", line 20, in swig_import_helper 
    return importlib.import_module('_pywrap_tensorflow') 
    File "C:\Program Files\Python35\lib\importlib\__init__.py", line 126, in impor 
t_module 
    return _bootstrap._gcd_import(name[level:], package, level) 
ImportError: No module named '_pywrap_tensorflow' 


Error importing tensorflow. Unless you are using bazel, 
you should not try to import tensorflow from its source directory; 
please exit the tensorflow source tree, and relaunch your python interpreter 
from there. 

입니다.

답변

2

이 오류 메시지는 TensorFlow가 종속되어있는 하나 이상의 DLL을 컴퓨터에서 사용할 수 없음을 의미합니다. Microsoft Visual C++ 2015 Redistributable Update 3 (x64 version)을 설치하면이 문제가 해결됩니다.

Visual Studio 2015 업데이트 3 또는 Python 3.5의 Anaconda 배포판이 설치된 경우에는이 문제가 발생하지 않습니다. 지금까지 파이썬 3.5의 Python.org 배포 사용자에게 영향을 미치는이 문제에 대해서만 들었습니다. 이를 반영하기 위해 문서를 업데이트 중이며 곧 표시 될 것입니다.

+0

효과가있었습니다. 답변 주셔서 감사합니다 – MrPyCharm

+0

좋아요. 이 문제는 Windows 10에서 virtualenv를 사용할 때 발생했습니다. 제안 된 배포판을 설치 한 후에는 문제가 직접 해결됩니다. 쉬운. 좋은 대답! – julypraise

관련 문제