0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

AnacondaでCondaHTTPError: HTTP 000が発生した対処

Posted at

WSL2上のAnacondaでプロキシも設定していない状態でCondaHTTPErrorが発生した。

 conda create -n test python=3.9
Collecting package metadata (current_repodata.json): failed

CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/linux-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.

If your current network has https://www.anaconda.com blocked, please file
a support request with your network engineering team.

'https//repo.anaconda.com/pkgs/main/linux-64'

原因

.condarcが消えていたみたい。

対応

conda info で情報の確認

 active environment : base
    active env location : /home/hoge/anaconda3
            shell level : 1
        active environment : base
    active env location : /home/katsuji/anaconda3
            shell level : 1
       user config file : /home/katsuji/.condarc #このファイルが消えていた
 populated config files :
          conda version : 22.9.0
    conda-build version : 3.22.0
         python version : 3.9.13.final.0
 populated config files :
          conda version : 22.9.0
    conda-build version : 3.22.0
         python version : 3.9.13.final.0

なにも書かずに.condarcを該当dirに作成

touch .condarc

無事作成できました。proxyを設定している場合も同様なエラーが出るみたいなのでその際はproxyの設定を.condarcに記載すればよい。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?