解决清华镜像源安装 pytorch 问题 CondaHTTPError: HTTP None None for url
·
问题描述
使用清华镜像源安装 pytorch 报错,显示无法访问
CondaHTTPError: HTTP None None for url <https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/win-64/repodata.json>
Elapsed: None
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.
SSLError(SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),),)
解决方法
用记事本打开 C:\Users\Administrator 下的 .condarc 文件

将 https 改成 http,如下所示。同时如果 .condarc 文件中有- default,建议删掉 - default。否则,会默认使用官方下载源下载,速度较慢。
channels:
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/win-64/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/win-64/
其他原因
打开清华镜像源https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/ ,如下图所示。
有个 win-64子目录,因此应该是
channels:
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/win-64/
而不是
channels:
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/

参考链接
更多推荐



所有评论(0)