问题描述
使用清华镜像源安装 pytorch 报错,显示无法访问
CondaHTTPError: HTTP None None for url <https:
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://img-blog.csdnimg.cn/984ef2f5ab794a8e9c3b364ac2808b38.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAc3Rhcl9mdW5jdGlvbg==,size_16,color_FFFFFF,t_70,g_se,x_16)
将 https 改成 http,如下所示。同时如果 .condarc 文件中有- default ,建议删掉 - default 。否则,会默认使用官方下载源下载,速度较慢。
channels:
- http:
- http:
- http:
其他原因
打开清华镜像源https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/ ,如下图所示。 有个 win-64 子目录,因此应该是
channels:
- http:
而不是
channels:
- http:
![在这里插入图片描述](https://img-blog.csdnimg.cn/5bf094b843944fbeb280d4ccbe531826.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAc3Rhcl9mdW5jdGlvbg==,size_16,color_FFFFFF,t_70,g_se,x_16)
参考链接
- Anaconda建立新的环境,出现CondaHTTPError: HTTP 000 CONNECTION FAILED for url … 解决过程
- 解决CondaHTTPError: HTTP 000 CONNECTION FAILED for url
|