How do you remove a channel, or at least instruct Conda to not abort if one of the channel URLs is down?
I was testing a buggy tool, which provided a Conda repo at https://www.idiap.ch/software/bob/conda/linux-64
, but now that repo is offline, and now all calls to conda create --prefix=./cenv -y python=3.7
fail with the message:
Collecting package metadata (current_repodata.json): failed
CondaHTTPError: HTTP 503 SERVICE UNAVAILABLE for url <https://www.idiap.ch/software/bob/conda/linux-64/current_repodata.json>
Elapsed: 00:02.470723
A remote server error occurred when trying to retrieve this URL.
A 500-type error (e.g. 500, 501, 502, 503, etc.) indicates the server failed to
fulfill a valid request. The problem may be spurious, and will resolve itself if you
try your request again. If the problem persists, consider notifying the maintainer
of the remote server.
I'm not using this channel in my create command, so I don't know why Conda fails rather than ignore it. How do I allow Conda to continue or purge the channel?
I tried removing the channel by running:
conda config --remove channels https://www.idiap.ch/software/bob/conda
outputs the error:
CondaKeyError: 'channels': 'https://www.idiap.ch/software/bob/conda' is not in the 'channels' key of the config file
Edit: My conda info
is:
active environment : None
shell level : 0
user config file : /home/myuser/.condarc
populated config files : /home/myuser/miniconda3/.condarc
/home/myuser/.condarc
conda version : 4.7.12
conda-build version : not installed
python version : 3.7.3.final.0
virtual packages :
base environment : /home/myuser/miniconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
https://www.idiap.ch/software/bob/conda/linux-64
https://www.idiap.ch/software/bob/conda/noarch
package cache : /home/myuser/miniconda3/pkgs
/home/myuser/.conda/pkgs
envs directories : /home/myuser/miniconda3/envs
/home/myuser/.conda/envs
platform : linux-64
user-agent : conda/4.7.12 requests/2.22.0 CPython/3.7.3 Linux/4.15.0-64-generic ubuntu/18.04.3 glibc/2.27
UID:GID : 1000:1000
netrc file : None
offline mode : False
Running either:
conda config --remove channels https://www.idiap.ch/software/bob/conda/linux-64
conda config --remove channels https://www.idiap.ch/software/bob/conda/noarch
outputs the error:
CondaKeyError: 'channels': 'https://www.idiap.ch/software/bob/conda/<name>' is not in the 'channels' key of the config file
These ire the contents of my .condarc
:
$ cat ~/.condarc
show_channel_urls: true
auto_activate_base: false
channels:
- defaults
conda config --remove channels https://www.idiap.ch/software/bob/conda
works in my test.
Another way is to open .condarc
files under your $HOME
directory, and comment out the corresponding channel line.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With