centos7+tensorflow1.5
import tensorflow as tf Traceback (most recent call last): File "<stdin>", line 1, in <module> File "tensorflow/init.py", line 24, in <module> from tensorflow.python import * File "tensorflow/python/init.py", line 49, in <module> from tensorflow.python import pywrap_tensorflow File "tensorflow/python/pywrap_tensorflow.py", line 25, in <module> from tensorflow.python.platform import self_check ImportError: No module named platform 在tensorflow下建了一个空的__init__.py,运行不可以,改变PATH和PYTHONPATH的值也不可以 最后发现换个目录执行就没问题了