在win10 64位上采用Anaconda3 4.2.0安装TensorFlow1.1.0

参考资料:

https://www.continuum.io/downloads
https://www.tensorflow.org/install/install_windows
https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/

  1. 下载Anaconda3 4.2.0
    注意,目前官网上最新的版本为4.3.1(17/5/25),该版本中默认包含Python3.6版本,不能直接安装TensorFlow(TensorFlow需要Python3.5的环境). 所以建议直接下载4.2.0版本. 另外Anaconda官网下载速度比较慢,建议使用清华的镜像进行下载.
    镜像地址:https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/
    下载地址:https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-4.2.0-Windows-x86_64.exe

  2. 安装Anaconda3
    无难度

  3. 使用Anaconda创建TensorFlow环境
    建议在执行之前,先添加清华镜像:

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
conda config --set show_channel_urls yes

安装后建议打开一个新的cmd窗口, 然后再创建TensorFlow环境,这里安装的是不带gpu的版本

conda create -n tensorflow
activate tensorflow
pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.1.0-cp35-cp35m-win_amd64.whl
  1. 测试
python
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容