美文网首页
在win10 64位上采用Anaconda3 4.2.0安装Te

在win10 64位上采用Anaconda3 4.2.0安装Te

作者: ezjs | 来源:发表于2017-05-25 15:57 被阅读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))

相关文章

网友评论

      本文标题:在win10 64位上采用Anaconda3 4.2.0安装Te

      本文链接:https://www.haomeiwen.com/subject/fjpwxxtx.html