2016-12-09 2 views
0

초심자를위한 tensorflow mnist 튜토리얼을 here에 넣으려고합니다.tensorflow 튜토리얼 (초보자를위한 mnist) 오류를 수정하는 방법은 무엇입니까?

자습서 스크립트를 실행하면 다음 오류가 발생합니다.
이 오류를 해결하는 방법?

이미지 데이터를 가져 오는 데 실패한 것처럼 보입니다.

Traceback (most recent call last): 
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/tensorflow/python/__init__.py", line 49, in <module> 
    from tensorflow.python import pywrap_tensorflow 
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module> 
    _pywrap_tensorflow = swig_import_helper() 
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper 
    _mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description) 
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/imp.py", line 242, in load_module 
    return load_dynamic(name, filename, file) 
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/imp.py", line 342, in load_dynamic 
    return _load(spec) 
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/tensorflow/python/_pywrap_tensorflow.so, 10): Library not loaded: @rpath/libcudart.8.0.dylib 
    Referenced from: /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/tensorflow/python/_pywrap_tensorflow.so 
    Reason: image not found 

During handling of the above exception, another exception occurred: 

Traceback (most recent call last): 
    File "mnist2.py", line 35, in <module> 
    import tensorflow as tf 
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/tensorflow/__init__.py", line 24, in <module> 
    from tensorflow.python import * 
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/tensorflow/python/__init__.py", line 60, in <module> 
    raise ImportError(msg) 
ImportError: Traceback (most recent call last): 
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/tensorflow/python/__init__.py", line 49, in <module> 
    from tensorflow.python import pywrap_tensorflow 
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module> 
    _pywrap_tensorflow = swig_import_helper() 
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper 
    _mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description) 
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/imp.py", line 242, in load_module 
    return load_dynamic(name, filename, file) 
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/imp.py", line 342, in load_dynamic 
    return _load(spec) 
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/tensorflow/python/_pywrap_tensorflow.so, 10): Library not loaded: @rpath/libcudart.8.0.dylib 
    Referenced from: /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/tensorflow/python/_pywrap_tensorflow.so 
    Reason: image not found 


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. 

답변

1

이미지에 문제가 있다고 생각하지 않습니다. 관련 선은 다음과 같습니다.

Library not loaded: @rpath/libcudart.8.0.dylib 

필요한 CUDA 라이브러리를로드하지 않았습니다. CUDA/GPU 지원으로 설치하겠습니까? 그렇다면 tensorflow installation page의 관련 섹션을 살펴 봐야합니다.

관련 문제