Methods for resetting after conda clean all
are recorded
It is worth noting that it is recommended to directly connect to Tsinghua source
Changing the mirror source of conda to Tsinghua source can significantly improve the download and update speed for domestic users. Here are the steps to switch to 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 channel URLs to see which source is being used when searching and installing packages:
conda config --set show_channel_urls yes
-
If needed, add other third-party sources like 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 the new mirror source is being used:
conda clean -i
-
After confirming the source change, check conda configuration using the following command:
conda info
-
If needed to revert the configuration back to default source, use the following command:
conda config --remove-key channels
Please note that after changing the source, it may be necessary to reinstall or update some packages to ensure they are from the new mirror source.