由于架构错误导致张量流导致出错

时间:2016-04-23 06:56:23

标签: macos python-3.4 tensorflow

我正按照列出的TensorFlow

说明,尝试在我的Mac ( OSX El Capitan 10.11.2)上安装here

我使用pip为tensorflow安装Python3,似乎所有内容都已成功安装。

但是当我去测试时,我会遇到这个错误:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/tensorflow/__init__.py", line 23, in <module>
    from tensorflow.python import *
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/tensorflow/python/__init__.py", line 45, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
    _pywrap_tensorflow = swig_import_helper()
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/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.4/lib/python3.4/imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/tensorflow/python/_pywrap_tensorflow.so, 10): no suitable image found.  Did find:
    /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/tensorflow/python/_pywrap_tensorflow.so: mach-o, but wrong architecture

这个错误没有列在常见问题上,我自己找不到任何结论。

更新: @mrry Alrighty,import sys; print(sys.maxsize)正在返回2147483647,因此python以32位模式运行。

0 个答案:

没有答案