在Python非法指令时,进口tensorflow(Illegal instruction when

2019-09-27 02:45发布

我想在shell中运行Python程序,CentOS的7.0 x64的,对VPS

python3版本是3.6.4

PIP3版本9.0.1

当我使用pip3 freezetensorflow==1.6.0

第一行xx.pyimport tensorflow

我是否使用python3 xx.py或类型import tensorflow在python3外壳,它原来是Illegal instruction

此外,其他进口喜欢import numpyimport sklearn功能良好,没有什么与他们错了

如何解决这个问题?

Answer 1:

TensorFlow 1.6开始使用现代CPU的AVX功能: https://github.com/tensorflow/tensorflow/releases/tag/v1.6.0

降级到1.5: pip install tensorflow==1.5



文章来源: Illegal instruction when import tensorflow in Python