mamba icon indicating copy to clipboard operation
mamba copied to clipboard

[micromamba] cannot install from yaml env file with only pip-based dependencies

Open wholtz opened this issue 3 years ago • 3 comments

$ micromamba --version
0.24.0
$ uname -a
Darwin WJHoltz-M64.local 21.4.0 Darwin Kernel Version 21.4.0: Fri Mar 18 00:45:05 PDT 2022; root:xnu-8020.101.4~15/RELEASE_X86_64 x86_64
$ cat environment.yaml 
name: test
channels: 
  - conda-forge 
dependencies:
  - pip: 
    - pytest
$ micromamba create -y -f environment.yaml 
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/WJHoltz/.mambarc'
trace    libmamba Configuration not found at '/Users/WJHoltz/.condarc'
trace    libmamba Configuration not found at '/Users/WJHoltz/.conda/condarc.d'
trace    libmamba Configuration not found at '/Users/WJHoltz/.conda/condarc'
trace    libmamba Configuration not found at '/Users/WJHoltz/.conda/.condarc'
trace    libmamba Configuration not found at '/Users/WJHoltz/micromamba/.mambarc'
trace    libmamba Configuration not found at '/Users/WJHoltz/micromamba/condarc.d'
trace    libmamba Configuration not found at '/Users/WJHoltz/micromamba/condarc'
trace    libmamba Configuration not found at '/Users/WJHoltz/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 'file_specs'
error    libmamba Bad conversion of 'dependencies' to a vector of string: 
critical libmamba bad conversion
info     libmamba ****************** Backtrace End ********************
$

wholtz avatar Jun 03 '22 17:06 wholtz

Looks like the pip dictionnary is not supported. If you add a normal dependency, and a pip one, it treats pip as a normal dependency.

$ cat test.yaml 
dependencies:
  - micromamba
  - pip:
    - pytest

Produces:

  Updating specs:

   - micromamba
   - pip


  Package                 Version  Build                   Channel                                         Size
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  Install:
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────

  + ca-certificates     2022.6.15  h59d1363_0              conda.tower-research.com/base-ng/linux-64      157kB
  + gdbm                     1.18  1                       conda.tower-research.com/base-ng/linux-64     Cached
  + libedit          3.1.20170329  hbd868cf_1              conda.tower-research.com/base-ng/linux-64     Cached
  + libffi                  3.2.1  1                       conda.tower-research.com/base-ng/linux-64     Cached
  + libxcb                   1.13  1                       conda.tower-research.com/base-ng/linux-64     Cached
  + micromamba             0.24.0  0                       conda.tower-research.com/base-ng/linux-64        6MB
  + ncurses                   6.0  2                       conda.tower-research.com/base-ng/linux-64     Cached
  + openssl                1.1.1j  0                       conda.tower-research.com/base-ng/linux-64        4MB
  + pip                    22.1.2  py38_0                  conda.tower-research.com/base-ng/linux-64        3MB
  + python                 3.8.10  he964b45_gcc103_nosi_0  conda.tower-research.com/base-ng/linux-64       42MB
  + readline                  6.2  hbd868cf_1              conda.tower-research.com/base-ng/linux-64     Cached
  + setuptools             62.3.2  py38_0                  conda.tower-research.com/base-ng/linux-64     Cached
  + sqlite                 3.35.2  hbd868cf_0              conda.tower-research.com/base-ng/linux-64     Cached
  + tk                      8.6.8  hd894559_3              conda.tower-research.com/base-ng/linux-64     Cached
  + wheel                  0.33.6  py38_0                  conda.tower-research.com/base-ng/linux-64     Cached
  + xz                      5.2.2  1                       conda.tower-research.com/base-ng/linux-64     Cached
  + zlib                   1.2.11  2                       conda.tower-research.com/base-ng/linux-64     Cached

nstinus avatar Jun 30 '22 14:06 nstinus

You always need to specify pip as a Conda dep. The error message could be better. Is it still as bad as it used to be?

jonashaag avatar Dec 06 '23 06:12 jonashaag

With micromamba v1.5.3, the error message is the same as my original report.

wholtz avatar Dec 06 '23 23:12 wholtz