使用Python / TensorFlow“找不到合适的图像”

时间:2016-10-24 17:36:01

标签: python tensorflow

我正在尝试从需要TensorFlow运行的GitHub(https://github.com/sherjilozair/char-rnn-tensorflow)运行程序,但每次使用TensorFlow(不仅仅是这个程序)时,我都会收到以下错误:

Traceback (most recent call last):
File "train.py", line 3, in <module>
import tensorflow as tf
File "/Library/Python/2.7/site-packages/tensorflow/__init__.py", line 23, in <module>
from tensorflow.python import *
File "/Library/Python/2.7/site-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/Library/Python/2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
_pywrap_tensorflow = swig_import_helper()
File "/Library/Python/2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
ImportError: dlopen(/Library/Python/2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so, 10): no suitable image found.  Did find:
/Library/Python/2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x03

我不确定发生了什么,我该如何解决这个问题才能使这些程序正常运行?

1 个答案:

答案 0 :(得分:1)

尝试按照建议的instructionshere重新安装Tensorflow。