win10安装Anaconda和TensorFlow

一、 安装环境
Windows 10
Python 3.5.2
Anaconda3-4.2.0-Windows-x86_64.exe
二、 下载资源来自国内清华镜像网站(清华大学开源软件镜像网站:https://mirrors.tuna.tsinghua.edu.cn
Anaconda3-4.2.0-Windows-x86_64.exe: https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/
三、 安装TensorFlow
安装过程一般是从anaconda仓库中下载,下载网址在国外,当然国外下载会很慢,镜像网站你值得拥有。所以需要先修改下载地址。
1. 打开刚刚安装好的Anaconda中的 Anaconda Prompt,然后输入:

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

这两行代码用来改成连接清华镜像的
2.接下来安装Tensorflow,在Anaconda Prompt中输入:

  conda create -n tensorflow python=3.5.2     

在这里插入图片描述
等待一会。。。。。。 输入 y 。
会有如下
在这里插入图片描述
看到上面这些 activate tensorflow(这么直白的英语,看看是不是很激动,)恭喜你,tensorflow你已经安装成功啦,去激活一下,紧接着输入:“activate tensorflow”就Ok了。我们要安装的是CPU版本,那么在命令下紧接着输入:

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ https://mirrors.tuna.tsinghua.edu.cn/tensorflow/windows/cpu/tensorflow-1.1.0-cp35-cp35m-win_amd64.whl
如果出现 404错误可以输入:
pip install https://mirrors.tuna.tsinghua.edu.cn/tensorflow/windows/cpu/tensorflow-1.1.0-cp35-cp35m-win_amd64.whl

你也可以自己选择对应的Tensorflow版本,可以在清华镜像中查看这样就说明安装成功。
在这里插入图片描述
四、测试

import tensorflow as tf
hello = tf.constant(‘Hello, Tensorflow!’)
sess = tf.Session()
print(sess.run(hello))
a = tf.constant(10)
b = tf.constant(22)
print(sess.run(a+b))

五、 安装过程出现的问题
在这里插入图片描述
这样忽略红色的部分,在命令框输入:

python -m pip install --upgrade pip

在这里插入图片描述
然后接着安装TensorFlow就OK;

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值