Centos7安装tensorflow

1、基础软件安装
yum install gcc
yum install gcc-c++
yum install glibc-headers
yum install -y openssl openssl-devel
yum install python-devel libffi-devel openssl-devel

2、安装python
centos自带python2.7,使用默认即可

3、安装python.pip
yum -y install epel-release
yum install python-pip
pip install –upgrade pip

4、安装tensorflow
pip install tensorflow

5、测试
import tensorflow as tf
hello = tf.constant(‘Hello, TensorFlow’)
session = tf.Session()
print session.run(hello)
a = tf.constant(11)
b = tf.constant(39)

print session.run(a+ b)

6、问题处理
如果出现 import tensorflow as tf 非法指令(吐核),那么建议换一台机器或者重装一下系统