2017-10-16 4 views
0

Ich installierte Tensorflow auf meinem Mac über Pip und ich verwende Anaconda als meine IDE. wenn ich laufe den BefehlKann nicht verwendet werden Tensorflow

import tensoflow

ich die folgende Fehlermeldung erhalten:

Traceback (most recent call last): 

File "<ipython-input-3-a649b509054f>", line 1, in <module> 
import tensorflow 

File "/Applications/anaconda3/lib/python3.5/site-packages/tensorflow/__init__.py", line 24, in <module> 
from tensorflow.python import * 

File "/Applications/anaconda3/lib/python3.5/site-packages/tensorflow/python/__init__.py", line 51, in <module> 
from tensorflow.python import pywrap_tensorflow 

File "/Applications/anaconda3/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 52, in <module> 
raise ImportError(msg) 

ImportError: Traceback (most recent call last): 
File "/Applications/anaconda3/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 41, in <module> 
from tensorflow.python.pywrap_tensorflow_internal import * 
File "/Applications/anaconda3/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module> 
_pywrap_tensorflow_internal = swig_import_helper() 
File "/Applications/anaconda3/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper 
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) 
File "/Applications/anaconda3/lib/python3.5/imp.py", line 243, in load_module 
return load_dynamic(name, filename, file) 
File "/Applications/anaconda3/lib/python3.5/imp.py", line 343, in load_dynamic 
return _load(spec) 
ImportError: dlopen(/Applications/anaconda3/lib/python3.5/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so, 10): Library not loaded: @rpath/libcublas.8.0.dylib 
Referenced from: /Applications/anaconda3/lib/python3.5/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so 
Reason: image not found 


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. 

Ich lief auch pip list in meinem Terminal zu überprüfen, ob sie korrekt installiert wurde. Es listet alle Tensorflow-Bibliotheken auf, die ich installiert habe. Output of pip list

Ich bin mit Anaconda v1.6.8 und Spyder V3.2.3

+0

Haben Sie eine NVIDIA-GPU in Ihrem Mac? – mrry

+0

Macs haben keine Nvidia GPU, also glaube ich nicht, dass die Verwendung der GPU-Version mir gut tun wird. Soll ich die Tensorflow-GPU deinstallieren? – Rasik

+0

Ja, das Deinstallieren von 'tensorflow-gpu' sollte das Problem beheben. – mrry

Antwort

3

Ich kann sehen, dass Sie zwei Versionen von tensorflow haben. mit (1.1.0) und ohne (1.3.0) GPU-Unterstützung. Aber der Fehler, den Sie bekommen, ist, weil die GPU-Bibliotheken nicht richtig installiert sind.

Für tensorflow-gpu==1.1.0 folgen Sie these instructions.

Leider Tensorflow dropped support for gpu on Mac since v1.2, aber diese answer kann Ihnen bei der Einrichtung für eine höhere Version helfen.

Verwandte Themen