anaconda下載catboost

一、出現的問題

首先在anaconda終端輸入以下命令:

conda install catboost

 後來還是發生了報錯:

Collecting package metadata (current_repodata.json): failed

CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/r/win-64/current_repodata.json>
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='conda.anaconda.org', port=443): Max retries exceeded with url: /r/win-64/current_repodata.json (Caused by ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x0000022C29EBEB48>, 'Connection to conda.anaconda.org timed out. (connect timeout=9.15)'))"))

 在Anaconda下準catboost備下載東西的時候,出現了這樣的報錯:

An HTTP error occurred when trying to retrieve this URL. HTTP errors are often intermittent......

二、解決問題

 查找了網上很多資料,可能是源的問題,就是默認下載東西的鏈接是國外的鏡像,存在一些問題,因此將源改成國內的鏡像即 可。

可以用清華大學提供的鏡像

conda config --add channels 'https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/'

conda config --set show_channel_urls yes

在C:\Users\用戶名 目錄下找到並打開 .condarc 文件加上如下內容:

channels: 
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ 
- defaults

show_channel_urls: yes

然後下載問題就可以解決。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章