win10 安装 tensorflow 并运行helloworld
折腾了一下,在win10上成功安装tensorflow.
1 下载安装python,注意一定要是64位(比如python-3.5.1-amd64)的,建议直接下载.exe版本的,在安装的时候选择添加环境变量;
2 下载最新的 tensorflow-1.1.0rc0-cp35-cp35m-win_amd64.whl 包;
3 输入命令pip install tensorflow-1.1.0rc0-cp35-cp35m-win_amd64.whl进行安装;
4 跑HellWorld进行测试;
![](https://images2015.cnblogs.com/blog/508489/201704/508489-20170409202841894-686783543.png)
跑HelloWorld
import tensorflow as tf
matrix1 = tf.constant([[3., 3.]])
matrix2 = tf.constant([[2.], [2.]])
product = tf.matmul(matrix1, matrix2)
sess = tf.Session()
result = sess.run(product)
print (result)
sess.close()
matrix1 = tf.constant([[3., 3.]])
matrix2 = tf.constant([[2.], [2.]])
product = tf.matmul(matrix1, matrix2)
sess = tf.Session()
result = sess.run(product)
print (result)
sess.close()
![](https://images2015.cnblogs.com/blog/508489/201704/508489-20170409202843832-360780569.png)