2017-11-25 176 views
0

這是我的環境目前安裝Tensorflow使用python3.6失敗

$ pip show tensorflow 
Name: tensorflow 
Version: 1.4.0 
Summary: TensorFlow helps the tensors flow 
Home-page: https://www.tensorflow.org/ 
Author: Google Inc. 
Author-email: [email protected] 
License: Apache 2.0 
Location: /usr/local/lib/python3.6/site-packages 
Requires: wheel, tensorflow-tensorboard, enum34, six, numpy, protobuf 

$ pip show protobuf 
Name: protobuf 
Version: 3.5.0 
Summary: Protocol Buffers 
Home-page: https://developers.google.com/protocol-buffers/ 
Author: [email protected] 
Author-email: [email protected] 
License: 3-Clause BSD License 
Location: /usr/local/lib/python3.6/site-packages 
Requires: six, setuptools 

$pip show six 
Name: six 
Version: 1.11.0 
Summary: Python 2 and 3 compatibility utilities 
Home-page: http://pypi.python.org/pypi/six/ 
Author: Benjamin Peterson 
Author-email: [email protected] 
License: MIT 
Location: /usr/local/lib/python3.6/site-packages 
Requires: 

Traceback (most recent call last):   File "", line 1, in   File "/Users/joson/tensorflow/lib/python3.6/site-packages/tensorflow/init.py", line 24, in     from tensorflow.python import *   File "/Users/joson/tensorflow/lib/python3.6/site-packages/tensorflow/python/init.py", line 51, in     from tensorflow.python import pywrap_tensorflow   File "/Users/joson/tensorflow/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 52, in     raise ImportError(msg) ImportError: Traceback (most recent call last):   File "/Users/joson/tensorflow/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 41, in     from tensorflow.python.pywrap_tensorflow_internal import *   File "/Users/joson/tensorflow/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in     _pywrap_tensorflow_internal = swig_import_helper()   File "/Users/joson/tensorflow/lib/python3.6/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 "/Users/joson/tensorflow/lib/python3.6/imp.py", line 242, in load_module     return load_dynamic(name, filename, file)   File "/Users/joson/tensorflow/lib/python3.6/imp.py", line 342, in load_dynamic     return _load(spec) ImportError: dlopen(/Users/joson/tensorflow/lib/python3.6/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so, 10): Library not loaded: @rpath/libcublas.8.0.dylib   Referenced from: /Users/joson/tensorflow/lib/python3.6/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so   Reason: image not found

+0

真的,我不知道,你想說的,請註明您的問題。它是否已安裝tensorflow並且它不適用於您的系統? –

+0

在我的mac中,在>>>導入tensorflow爲tf之後,無法加載本地TensorFlow運行時 – Joson

+0

它看起來像是試圖找到libcublas.8.0.dylib。你安裝了CUDA嗎?你用什麼命令來安裝TensorFlow? – MatthewScarpino

回答

1

正如在評論中討論的,問題是,針對Mac OS X的GPU版本TensorFlow的安裝到一個未安裝CUDA的Mac。卸載並重新安裝CPU版本的TensorFlow應解決該問題。

(請注意,TensorFlow爲Mac OS X的GPU版本不再正式支持。)