如何在windows上面安装tensorflow
最近在配置环境,需要用到tensorflow,看到有的博客上面写到需要安装setuptools
pip install --upgrade -I setuptools
然后安装tensorflow
pip install --upgrade --ignore-installed tensorflow
but 我发现这种方法下载太慢了,决定用国内的清华镜像
第一步:添加通道
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
然后输入
conda config --set show_channel_urls yes
这样就可以愉快的用到国内清华镜像快速的下载了
第二步:安装tensorflow
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
可按照自己的python版本和电脑系统安装对应的tensorflow包,很快你就会看到tensorflow已经下载完成了
第三步:测试
输入python
然后import tensorflow
观察没有任何异常,安装成功
(tip)你也可以直接打开镜像的网址,找到自己需要的内容,直接下载https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ .