通过我的上一篇博客的安装过程中,有些网络会存在
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
ConnectTimeout(MaxRetryError("HTTPSConnectionPool(host='conda.anaconda.org', port=443): Max retries exceeded with url: /conda-forge/win-64/repodata.json (Caused by ConnectTimeoutError(, 'Connection to conda.anaconda.org timed out. (connect timeout=9.15)'))",),)
Error: Error 1 occurred installing packages into conda environment r-tensorflow
In addition: Warning message:
running command '"D:\DATA\user\APPLIC~1\ANACON~1\Scripts\conda.exe" "install" "-c" "conda-forge" "--yes" "--name" "r-tensorflow" "tensorflow" "h5py" "pyyaml" "requests" "Pillow" "keras" "scipy"' had status 1
等一系列问题,我找了很久才找到解决办法,
直接找到.condarc文件
然后打开.condarc文件
对照我写的配置好如下几列:
proxy_servers:
http: http://user:pass@proxy1:port
https: https://user:[email protected]:port
保存然后再执行命令就可以执行conda的命令啦。
1.安装Anaconda
选择相应的Anaconda进行安装,下载地址点击这里,下载对应系统版本的Anaconda,官网现在的版本是Anaconda 4.3.1 for python3.6。笔者安装的是4.3.0版本的。
就和安装普通的软件一样,全部选择默认即可,注意勾选将python3.6添加进环境变量。
这样Anaconda就安装好了,我们可以通过下面的命令来查看Anaconda已经安装了哪些包。
运行 开始菜单->Anaconda3—>Anaconda Prompt
:
conda list
可以看到已经安装了numpy、sympy等常用的包。
2.安装Tensorflow
TensorFlow目前在Windows下只支持python 3.5版本。
(1)打开Anaconda Prompt,输入清华仓库镜像,这样更新会快一些:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes
(2)同样在Anaconda Prompt中利用Anaconda创建一个python3.5的环境,环境名称为tensorflow ,输入下面命令:
conda create -n tensorflow python=3.5