When using Anaconda to install a third-party library, the default download website is abroad, so the download speed is very slow. You can add a domestic mirror source to increase the download speed.
1. Add Tsinghua mirror source
If the mirror source website fails, you can go to Tsinghua University Open Source Software Mirror Station | Tsinghua Open Source Mirror to obtain the URL.
# 添加清华镜像源
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
# 搜索时显示地址
conda config --set show_channel_urls yes
2. View the configuration of the conda channel
conda config --show channels
Display all channels of conda:
If the channel contains defaults, it needs to be deleted, so that the Tsinghua mirror source will be used by default when downloading:
conda config --remove channels defaults
3. Reset channel settings
If you want to delete all the added image sources and reset the conda default source, you can use the following statement:
conda config --remove-key channels