Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Command to display active conda channels

Tags:

python

conda

Is there a command to display active conda channels?

I know I can search for the .condarc file to check for any added channels. However, there are two problems with this approach:

  1. The default channels might change on newer version of conda. For example, since conda 4.7, the free channel has been removed from the default channels. Another example is the addition of channel main in conda 4.3.27.
  2. No unified way to display channels (that is open file contents) in different OS.

Therefore, a command is necessary for viewing active conda channels. Does such a command exist? I have conducted a web search, but have I have not found something.

like image 319
pgmank Avatar asked Sep 03 '19 23:09

pgmank


1 Answers

In addition to conda info, one can also query configuration info specifically with the conda config --show [key] command. For high-level channel names, one can use

conda config --show channels

which outputs what you'd see in the .condarc, i.e., just the names of the channels, no URLs. The URLs used in defaults can be queried separately,

conda config --show default_channels

which for me gives,

default_channels:
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
like image 143
merv Avatar answered Oct 18 '22 17:10

merv