4

I was searching on how to save anaconda environment as requirement.txt files. I came across two commands:

  • conda list --explicit > $dir_path/$file_name.txt
  • conda list --export > $dir_path/$file_name.txt

These two created different two text files with different form of tabular structure.

  • The explicit one created a file like this:

enter image description here

  • while the export command created a file like this:

enter image description here

While both files do say that they can be used to recreate the environment(which I did try just to check and it works), I was confused why there are two commands for essentially the same feature. Why do these two commands exist and what are the specific usecases to use anyone of these.

THANKS IN ADVANCE.

  • `--explicit` includes channels, which is useful if you are doing e.g. bioinformatics and using both `bioconda` and `conda-forge`, or for another example if you are fitting neural nets and using Torch from the `pytorch` channel. There may be other differences, idk. – eric_kernfeld Apr 04 '23 at 19:17

0 Answers0