preamble
Today when I was downloading OpenCV, I found that Tsinghua's conda channel image is no longer available, so I am recording it here:
1) How to display all channels;
2) How to change channel.
1 Display all channels
First, conda config --show is able to show all the conda config information.
If we only want to see information about channels, type conda config --show channels as follows:
(base) C:\Users\dehen>conda config --show channels
channels:
- /anaconda/cloud/conda-forge/
- defaults
Now we have two sources, a Tsinghua mirror and a defauls default download source.
However this Tsinghua source is no longer working, I was downloading opencv and typed: conda install opencv but it reported an error:
(base) C:\Users\dehen>conda install opencv
Solving environment: failedCondaHTTPError: HTTP 000 CONNECTION FAILED for url </anaconda/cloud/conda-forge/win-64/>
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.
ConnectionError(ReadTimeoutError("HTTPSConnectionPool(host='', port=443): Read timed out."))
So I'm going to delete this source.
2 Remove Tsinghua Mirror
Enter: conda config --remove channels/anaconda/cloud/conda-forge/
This command removes the clearwave sources previously shown by conda config --show channels.
(base) C:\Users\dehen>conda config --remove channels /anaconda/cloud/conda-forge/
(base) C:\Users\dehen>conda config --show channels
channels:
- defaults(base) C:\Users\dehen>
At this point, running conda config --show channels again will reveal that the Tsinghua source has been deleted
3 Adding Available Tsinghua Sources
Referring to [4], I realized that the address of my previous installation of Tsinghua Source/anaconda/cloud/conda-forge/ It is a mirror of conda-forge, one of the conda tripartite sources maintained by Tsinghua,, in addition to many other sources available at Tsinghua.
So I added it according to the instructions on the website:
conda config --add channels /anaconda/pkgs/free/ conda config --add channels /anaconda/pkgs/main/ conda config --set show_channel_urls yes
conda config --set show_channel_urls yes means to show the url of the channel when installing packages from the channel, so that you can tell where the packages were installed from.
4 Download opencv
After adding this source (channel), I re-ran conda install opencv and was able to download it successfully!!!!
But in the middle, surprisingly, it is an automatic install, and when confirming [Y/N] before installing, conda just skips it and defaults to Y..
It made it very hard for me, so I ran it:
conda config --set always_yes false
(The idea here is that in the installation confirmation, instead of defaulting to yes, it's up to me)
5 Some other conda directives
conda install <package name> Installs the specified package.
conda remove <package name> Remove the specified package.
conda update <package name> update the specified package
bibliography
[1]Annaconda add and remove mirrors channel, and other python packages installation solution
It started out when I read the comments here and realized that the Tsinghua source wouldn't work.
[2] Conda commands in detail
Learned a few conda commands here
[3] [Accelerate] Add domestic mirrors for conda
It was here that I found out that the original seiyuu source I had added earlier was not the same as the real one, which prompted me to look further for available seiyuu sources.
[4] Anaconda Mirror Usage Help
Here is the official website of ClearSource, I found the available ClearSource and installed it.
To this point this article on conda using Tsinghua source to set up channel mirror article is introduced to this, more related to conda channel mirror content please search for my previous articles or continue to browse the following related articles I hope you will support me in the future more!