01 Windows安装Tensorflow

一、安装Python。python

    点击此处下载Python3.5.2。安装Python时必定要选择安装pip。git

二、配置Python环境变量。github

    将%安装路径%\Scripts添加到Path下面。windows

三、修改Pip国内源。api

    在C:\Users\l{你的用户名}\AppData\Local下面建立pip文件夹,在pip文件夹中新建pip.conf文件,写入如下内容。测试

[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com  

 

四、安装Tensorflow。ui

    打开PowerShell,执行如下代码。google

pip install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-0.12.0rc1-cp35-cp35m-win_amd64.whl

    上面的安装包安装后,Tensorboard没法显示任何数据,使用下面的安装包安装。url

pip install --upgrade http://ci.tensorflow.org/view/Nightly/job/nightly-win/DEVICE=cpu,OS=windows/lastSuccessfulBuild/artifact/cmake_build/tf_python/dist/tensorflow-0.12.1-cp35-cp35m-win_amd64.whl

 

五、测试安装。spa

    打开Python IDLE,输入import tensorflow as tf,运行。若是不报错,证实安装成功。

 

六、参考资料。

    《原生Windows安装Tensorflow0.12的方法》:http://blog.csdn.net/include1224/article/details/53452824

 

注意事项:

一、使用参考资料中的包安装的Tensorflow,其中的TensorBoard,在Windows下没法正常显示,这是因为缺乏资源包的缘由。详情请见:https://github.com/tensorflow/tensorflow/issues/5983。官方给出的解决方案是在新版本出来之前,使用http://ci.tensorflow.org/view/Nightly/job/nightly-win/的版本安装。rc0和rc1都存在这个问题。

相关文章
相关标签/搜索