指定清华镜像
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes
然后再
conda create -n tensorflow_gpu python=3.6
程序报错
错误信息:
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.continuum.io/pkgs/main/win-64/repodata.json.bz2>
Elapsed: -
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='repo.continuum.io', port=443): Max retries exceeded with url: /pkgs/main/win-64/repodata.json.bz2 (Caused by ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x000002AAC9D3FCF8>, 'Connection to repo.continuum.io timed out. (connect timeout=9.15)'))",),)
解决办法:
管理员权限打开Anaconda Prompt
输入命令:
conda config –show
显示
再输入命令
conda --help
显示
找到file (C:\Users\cola\.condarc) by default.这行
按照自己的这个地址找到.condarc
用记事本打开,.condarc的内容为
channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
- defaults
show_channel_urls: true
删掉- defaults,保存,问题解决。