2017.10 最新版tensorflow for windows安装过程记录

来源:互联网 发布:软件开发公司上市资质 编辑:程序博客网 时间:2024/06/05 11:54


作者:muhongdi@qq.com

tensorflow是google开源的人工智能程序,通过多层神经网络实现图像识别,机器学习等AI功能。

本文简要记录一下安装tensorflow for windows的过程,2017年10月的最新版本,之前的版本对windows支持的不是很好,但这个版本看上去没什么问题了。

提示:
   红色是输入的命令
   需要在翻墙状态下安装
   需要提前安装windows的仿Linux命令行工具
   红色字体是输入的命令


C:\Users\Administrator>activate tensorflow
(tensorflow) C:\Users\Administrator>e:
(tensorflow) E:\>cd tensorflow
(tensorflow) E:\tensorflow>pip install --ignore-installed --upgrade tensorflow
Collecting tensorflow
  Downloading tensorflow-1.3.0-cp35-cp35m-win_amd64.whl (25.5MB)
    100% |████████████████████████████████| 25.5MB 26kB/s
Collecting six>=1.10.0 (from tensorflow)
  Downloading six-1.11.0-py2.py3-none-any.whl
Collecting protobuf>=3.3.0 (from tensorflow)
  Downloading protobuf-3.4.0-py2.py3-none-any.whl (375kB)
    100% |████████████████████████████████| 378kB 48kB/s
Collecting numpy>=1.11.0 (from tensorflow)
  Downloading numpy-1.13.1-cp35-none-win_amd64.whl (7.8MB)
    100% |████████████████████████████████| 7.8MB 88kB/s
Collecting wheel>=0.26 (from tensorflow)
  Downloading wheel-0.30.0-py2.py3-none-any.whl (49kB)
    100% |████████████████████████████████| 51kB 276kB/s
Collecting tensorflow-tensorboard<0.2.0,>=0.1.0 (from tensorflow)
  Downloading tensorflow_tensorboard-0.1.6-py3-none-any.whl (2.2MB)
    100% |████████████████████████████████| 2.2MB 492kB/s
Collecting setuptools (from protobuf>=3.3.0->tensorflow)
  Downloading setuptools-36.5.0-py2.py3-none-any.whl (478kB)
    100% |████████████████████████████████| 481kB 453kB/s
Collecting markdown>=2.6.8 (from tensorflow-tensorboard<0.2.0,>=0.1.0->tensorflow)
  Downloading Markdown-2.6.9.tar.gz (271kB)
    100% |████████████████████████████████| 276kB 247kB/s
Collecting werkzeug>=0.11.10 (from tensorflow-tensorboard<0.2.0,>=0.1.0->tensorflow)
  Downloading Werkzeug-0.12.2-py2.py3-none-any.whl (312kB)
    100% |████████████████████████████████| 317kB 764kB/s
Collecting bleach==1.5.0 (from tensorflow-tensorboard<0.2.0,>=0.1.0->tensorflow)
  Downloading bleach-1.5.0-py2.py3-none-any.whl
Collecting html5lib==0.9999999 (from tensorflow-tensorboard<0.2.0,>=0.1.0->tensorflow)
  Downloading html5lib-0.9999999.tar.gz (889kB)
    100% |████████████████████████████████| 890kB 191kB/s
Building wheels for collected packages: markdown, html5lib
  Running setup.py bdist_wheel for markdown ... done
  Stored in directory: C:\Users\Administrator\AppData\Local\pip\Cache\wheels\bf\46\10\c93e17ae86ae3b3a919c7b39dad3b5c
  Running setup.py bdist_wheel for html5lib ... done
  Stored in directory: C:\Users\Administrator\AppData\Local\pip\Cache\wheels\6f\85\6c\56b8e1292c6214c4eb73b9dda50f53e
Successfully built markdown html5lib
Installing collected packages: six, setuptools, protobuf, numpy, wheel, markdown, werkzeug, html5lib, bleach, tensorf
Successfully installed bleach-1.5.0 html5lib-0.9999999 markdown-2.6.9 numpy-1.13.1 protobuf-3.4.0 setuptools-36.5.0 s
0

(tensorflow) E:\tensorflow>
(tensorflow) E:\tensorflow>python
Python 3.5.4 |Continuum Analytics, Inc.| (default, Aug 14 2017, 13:41:13) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
2017-09-27 01:08:08.736271: W C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\35\tensorflow\core\platform\cpu_featu
these are available on your machine and could speed up CPU computations.
>>> print(sess.run(hello))
b'Hello, TensorFlow!'

可以看到这里可以直接使用python语言输出结果了
原创粉丝点击