我试图在shell上运行python程序,CentOS 7.0 x64,在VPS上
python3版本是3.6.4
pip3版本是9.0.1
当我使用pip3 freeze
时,它有tensorflow==1.6.0
xx.py
的第一行是import tensorflow
我是否在python3 shell中使用python3 xx.py
或输入import tensorflow
,结果证明是Illegal instruction
此外,像import numpy
,import sklearn
这样的任何其他导入功能都很好,没有任何问题
如何解决这个问题?
答案 0 :(得分:2)
TensorFlow 1.6开始使用现代CPU的AVX功能: https://github.com/tensorflow/tensorflow/releases/tag/v1.6.0
降级为1.5:
pip install tensorflow==1.5