問題の説明
condaがパッケージをインストールすると、ダウンロードが中断され、インストールが失敗しました。エラーメッセージは次のとおりです。
Error:
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pk
gs/pro/noarch/repodata.json.bz2>
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.
If your current network has https://www.anaconda.com blocked, please file
a support request with your network engineering team.
ConnectionError(MaxRetryError("HTTPSConnectionPool(host='repo.anaconda.com', por
t=443): Max retries exceeded with url: /pkgs/pro/noarch/repodata.json.bz2 (Cause
d by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0
x0000000005046400>: Failed to establish a new connection: [WinError 10061] No co
nnection could be made because the target machine actively refused it',))",),)
原因分析
これは、ネットワークが不安定で、HTTP接続のタイムアウトが発生するためです。
解決
接続時間を設定します。出力コマンドは次のとおりです。
conda config --set remote_read_timeout_secs 600.0
conda config --set remote_connect_timeout_secs 60.0
ソースを使用しない場合は、ソース接続を使用してダウンロードを高速化することをお勧めします。清華ソース。