mamba icon indicating copy to clipboard operation
mamba copied to clipboard

`micromamba create` does not support multiple YAML environment files

Open peanutfun opened this issue 2 years ago • 1 comments

Troubleshooting docs

  • [X] My problem is not solved in the Troubleshooting docs

Anaconda default channels

  • [X] I do NOT use the Anaconda default channels (pkgs/* etc.)

How did you install Mamba?

Micromamba

Search tried in issue tracker

Latest version of Mamba

  • [X] My problem is not solved with the latest version

Tried in Conda?

Not applicable

Describe your issue

The Micromamba documentation on YAML spec files clearly states

You can pass multiple YAML spec files by repeating the -f,--file argument.

However, when passing multiple different files with the -f argument, micromamba reports the following error:

$ micromamba create -n my_env -f file1.yml -f file2.yml
[Backtrace...]
critical libmamba Can only handle 1 yaml file!

Curiously, the error does not occur when repeating the -f argument with the same environment spec file. But this of course does not include the specs from file2.yml:

$ micromamba create -n my_env -f file1.yml -f file1.yml

mamba info / micromamba info

libmamba version : 1.5.6
     micromamba version : 1.5.6
           curl version : libcurl/8.5.0 SecureTransport (OpenSSL/3.2.0) zlib/1.2.13 zstd/1.5.5 libssh2/1.11.0 nghttp2/1.58.0
     libarchive version : libarchive 3.7.2 zlib/1.2.13 bz2lib/1.0.8 libzstd/1.5.5
       envs directories : /Users/ldr.riedel/micromamba/envs
          package cache : /Users/ldr.riedel/micromamba/pkgs
                          /Users/ldr.riedel/.mamba/pkgs
            environment : /Users/ldr.riedel/mambaforge (active)
           env location : /Users/ldr.riedel/mambaforge
      user config files : /Users/ldr.riedel/.mambarc
 populated config files : /Users/ldr.riedel/mambaforge/.condarc
                          /Users/ldr.riedel/.condarc
       virtual packages : __unix=0=0
                          __osx=14.1.1=0
                          __archspec=1=arm64
               channels : https://conda.anaconda.org/conda-forge/osx-arm64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/osx-arm64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/osx-arm64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://conda.anaconda.org/nodefaults/osx-arm64
                          https://conda.anaconda.org/nodefaults/noarch
       base environment : /Users/ldr.riedel/micromamba
               platform : osx-arm64

Logs

$ micromamba create -n climada_env -f climada_python/requirements/env_climada.yml -f climada_petals/requirements/env_climada.yml 
info     libmamba ****************** Backtrace Start ******************
debug    libmamba Loading configuration
trace    libmamba Compute configurable 'create_base'
trace    libmamba Compute configurable 'no_env'
trace    libmamba Compute configurable 'no_rc'
trace    libmamba Compute configurable 'rc_files'
trace    libmamba Compute configurable 'root_prefix'
trace    libmamba Get RC files configuration from locations up to HomeDir
trace    libmamba Configuration not found at '/Users/ldr.riedel/.mambarc'
trace    libmamba Configuration not found at '/Users/ldr.riedel/.mamba/mambarc.d'
trace    libmamba Configuration not found at '/Users/ldr.riedel/.mamba/mambarc'
trace    libmamba Configuration not found at '/Users/ldr.riedel/.mamba/.mambarc'
trace    libmamba Configuration not found at '/Users/ldr.riedel/.config/mamba/mambarc.d'
trace    libmamba Configuration not found at '/Users/ldr.riedel/.config/mamba/mambarc'
trace    libmamba Configuration not found at '/Users/ldr.riedel/.config/mamba/.mambarc'
trace    libmamba Configuration found at '/Users/ldr.riedel/.condarc'
trace    libmamba Configuration not found at '/Users/ldr.riedel/.conda/condarc.d'
trace    libmamba Configuration not found at '/Users/ldr.riedel/.conda/condarc'
trace    libmamba Configuration not found at '/Users/ldr.riedel/.conda/.condarc'
trace    libmamba Configuration not found at '/Users/ldr.riedel/.config/mamba/../conda/condarc.d'
trace    libmamba Configuration not found at '/Users/ldr.riedel/.config/mamba/../conda/condarc'
trace    libmamba Configuration not found at '/Users/ldr.riedel/.config/mamba/../conda/.condarc'
trace    libmamba Configuration not found at '/Users/ldr.riedel/micromamba/.mambarc'
trace    libmamba Configuration not found at '/Users/ldr.riedel/micromamba/condarc.d'
trace    libmamba Configuration not found at '/Users/ldr.riedel/micromamba/condarc'
trace    libmamba Configuration not found at '/Users/ldr.riedel/micromamba/.condarc'
trace    libmamba Configuration not found at '/var/lib/conda/.mambarc'
trace    libmamba Configuration not found at '/var/lib/conda/condarc.d/'
trace    libmamba Configuration not found at '/var/lib/conda/condarc'
trace    libmamba Configuration not found at '/var/lib/conda/.condarc'
trace    libmamba Configuration not found at '/etc/conda/.mambarc'
trace    libmamba Configuration not found at '/etc/conda/condarc.d/'
trace    libmamba Configuration not found at '/etc/conda/condarc'
trace    libmamba Configuration not found at '/etc/conda/.condarc'
trace    libmamba Update configurable 'no_env'
trace    libmamba Compute configurable 'envs_dirs'
trace    libmamba Compute configurable 'file_specs'
critical libmamba Can only handle 1 yaml file!
info     libmamba ****************** Backtrace End ********************

environment.yml

No response

~/.condarc

channels:
  - defaults
  - conda-forge
  - nodefaults
channel_priority: strict

peanutfun avatar Feb 21 '24 14:02 peanutfun

FYI I think this is closed by https://github.com/mamba-org/mamba/pull/2993. Give it a try. I've been creating envs from multiple yamls for a while.

jchorl avatar May 25 '24 19:05 jchorl