注意:由于Tensorflow要求Python2.7及以上版本,所以需要保证python版本满足需求
1.安装tensorflow
pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.4.1-cp27-none-linux_x86_64.whl
2.可以编写个hello文件进行测试:
vi hello.py
内容如下:
import tensorflow as tf
sess = tf.Session()
a = tf.constant(100)
b = tf.constant(20)
print sess.run(a+b)
3.运行这个python文件,检查结果,无错则安装正确:
python hello.py