您的位置:首页 > 健康 > 美食 > Anaconda 中遇到CondaHTTPError: HTTP 404 NOT FOUND for url的问题及解决办法

Anaconda 中遇到CondaHTTPError: HTTP 404 NOT FOUND for url的问题及解决办法

2024/10/6 0:09:00 来源:https://blog.csdn.net/faye0412/article/details/142035414  浏览:    关键词:Anaconda 中遇到CondaHTTPError: HTTP 404 NOT FOUND for url的问题及解决办法

最近在跑一个开源项目遇到了以下问题,查了很多资料都大(抄)同(来)小(抄)异(去)的,解决不了根本问题,费了很大的劲终于得以解决,记录如下:

1、问题及过程:

(myenv) D:\Workspace\python\XXXXX>conda install python=3.6.13 
Solving environment: done.....Proceed ([y]/n)? yDownloading and Extracting Packages
certifi-2021.5.30    | 142 KB    |                |   0%  
......CondaHTTPError: HTTP 404 NOT FOUND for url <https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64/certifi-2021.5.30-py36haa95532_0.tar.bz2>
Elapsed: 00:00.050146An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.CondaHTTPError: HTTP 404 NOT FOUND for url <https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64/python-3.6.13-h3758d61_0.tar.bz2>
Elapsed: 00:00.189201.......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.

2、解决办法:

在用户目录下(如win10中C:\Users\xxx\),修改.condarc文件,内容替换如下:

channels:- defaults
show_channel_urls: true
channel_alias: https://repo.anaconda.com
default_channels:- https://repo.anaconda.com/pkgs/main- https://repo.anaconda.com/pkgs/free- https://repo.anaconda.com/pkgs/r- https://repo.anaconda.com/pkgs/pro- https://repo.anaconda.com/pkgs/msys2
custom_channels:conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloudmsys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloudbioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloudmenpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloudpytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloudsimpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud

关键点在于:default_channels用的官方的源,custom_channels用的清华的源。

问题最终得以解决。

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com