在window下搭建TensorFlow

1.首先查看TensorFlow目前对Windows支持的python版本要求

https://pypi.python.org/pypi/tensorflow/1.1.0rc2


截止本文2018年2月27日,要求python是3.5,操作系统64位

如果python版本不正确会提示


Could not find a version that satisfies the requirement tensorflow (from versions: ) No matching distribution found for tensorflow

2.安装python

本文安装3.5.2 64位版本  注意安装完后配置环境变量并重启计算机

https://www.python.org/downloads/release/python-352/


3.安装pip

https://pypi.python.org/pypi/pip  下载pip压缩包


下载完后解压后在文件目录里cmd安装

python setup.py install

安装完后,cmd输入 python pip检验是否安装成功


4.安装tensorflow

用管理员权限进入cmd输入: python -m pip install tensorflow


慢慢等待安装。。。

安装完成后,我们可以测试下,用python IDE新建一个文件

[python]  view plain  copy
  1. import tensorflow as tf  
  2. hello = tf.constant('Hello, TensorFlow!')  
  3. sess = tf.Session()  
  4. print(sess.run(hello))  

运行可以看到


安装成功!

猜你喜欢

转载自blog.csdn.net/yongzhen150/article/details/80031141