Conda HTTP 000 CONNECTION FAILED for url

article directory

  • problem
  • cause
  • solution

problem

on MAC when conda create –name tensorflow1.4python3.6 python=3.6, the following problem

occurs

==============
XXX ~ % conda create –name tensorflow1.4python3.6
python=3.6
collection package metadata (current_repodata.json): failed

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

===================

why
The

download failed because of an incorrect channel selection, which slowed access to anaconda’s url.
can view all optional channels, command: conda config –show-sources, the following prompt
> /Users/xx/.condarc <
ssl_verify: True
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/ms Ys2 /
  • defaults
    show_channel_urls: True
    as you can see, there are three channels here, maybe one of them was wrong.

solution

delete all other channels, keep the first channel
(1) open the.condarc file, command: open.condarc
change this to
ssl_verify: True
channels:

channels:

channels:

channels

  • https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ show_channel_urls: True save file

Read More: