[Solved] Conda install Error: An HTTP error occurred when trying to retrieve this URL. HTTP errors are often…

1. Problem Description: prepare to execute the following command in Anaconda prompt:

conda install -c stellargraph stellargraph

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. Solution: open “C:\users\your computer name\condarc

Delete all lines in condarc, copy and paste the following code, and then save:

channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
  - defaults
show_channel_urls: true
ssl_verify: true

(anyway, I can finally succeed in this file with the above code. I don’t know if you can do it.

3. Re run

conda install -c stellargraph stellargraph
    1. as long as you don’t report an error (try it several times, it may not work well). Maybe it will take a long time. Please be patient. If you want to improve the speed, you’d better create a new virtual environment and install the software, which will be much faster

Create a new environment ( CONDA env create - n env_name ) and install the software. In this way, the compatibility with the existing software will not be considered. It can also greatly reduce the search space and improve the speed of resolving software dependencies.

Read More: