安装Tensorflow使用python3.6失败
这是我的环境目前安装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
正如在评论中讨论的,问题是,针对Mac OS X的GPU版本TensorFlow的安装到一个未安装CUDA的Mac。卸载并重新安装CPU版本的TensorFlow应解决该问题。
(请注意,TensorFlow为Mac OS X的GPU版本不再正式支持。)
真的,我不知道,你想说的,请注明您的问题。它是否已安装tensorflow并且它不适用于您的系统? –
在我的mac中,在>>>导入tensorflow为tf之后,无法加载本地TensorFlow运行时 – Joson
它看起来像是试图找到libcublas.8.0.dylib。你安装了CUDA吗?你用什么命令来安装TensorFlow? – MatthewScarpino