码迷,mamicode.com
首页 > Web开发 > 详细

Anaconda解决Pytorch安装(升级)过程中的CondaHTTPError问题

时间:2020-01-20 19:12:56      阅读:520      评论:0      收藏:0      [点我收藏+]

标签:sed   his   username   error   detail   trie   而且   org   window   

安装过程中出现CondaHTTPError

pytorch-error:

CondaHTTPError: HTTP 000 CONNECTION FAILED for url
Elapsed: -

An HTTP error occurred when trying to retrieve this URL.

解决:

按如下配置.condarc文件,必须添加下面三个,其中Pytorch文件存放在/cloud/。.condarc文件一般windows:C:\users\username\,linux:/home/username/

channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
  - defaults
show_channel_urls: true

执行相应的install语句:https://pytorch.org/
技术图片
重点:去除命令的 -c pytorch,这一点指令指向了conda官方的Pytorch下载库通道,会非常慢,而且极其容易下载失败,去掉后会到我们之前配置的channel中寻找。而且本环境不能下载过其他的版本,否则去掉-c pytorch后会默认下载之前下载过的版本(Ver0.1),仍然不会更新成功。
技术图片
技术图片

————————————————
原文链接:https://blog.csdn.net/weixin_42028879/article/details/89363933

Anaconda解决Pytorch安装(升级)过程中的CondaHTTPError问题

标签:sed   his   username   error   detail   trie   而且   org   window   

原文地址:https://www.cnblogs.com/xym4869/p/12218924.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!