Method for resetting after conda clean all
record
It is worth noting that it is recommended to directly connect to Tsinghua source
Changing the mirror source of conda to Tsinghua can significantly improve the download and update speed for domestic users. Here are the steps to switch to the Tsinghua source:
-
Open Anaconda Prompt (or command line terminal).
-
Add Tsinghua source channels using the following commands:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
-
Display the channel URLs so that you can see which source is being used when searching and installing packages:
conda config --set show_channel_urls yes
-
If needed, you can add other third-party sources such as conda-forge, msys2, bioconda, etc.:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/ 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/bioconda/
-
Clear the old index cache to ensure that the newly added mirror source is being used:
conda clean -i
-
After confirming the source change, you can check conda's configuration using the following command:
conda info
-
If you need to revert the configuration back to the default source, you can use the following command:
conda config --remove-key channels
Please note that after changing the source, you may need to reinstall or update some packages to ensure they are coming from the new mirror source.