mamba icon indicating copy to clipboard operation
mamba copied to clipboard

micromamba env update --prune not working properly

Open brano543 opened this issue 1 year ago • 0 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

micromamba env update

Latest version of Mamba

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

Tried in Conda?

I didn't try

Describe your issue

Hello guys,

I have tried the latest release https://github.com/mamba-org/mamba/releases/tag/2023.12.14 to see if command micromamba env update -f ./conda/linux_env.yaml --prune works correctly.

Unfortunately after --prune flag is added, command sometimes fails.

.envrc file

export PATH=$HOME/micromamba:$PATH
export MAMBARC=$(realpath ./.mambarc)
export MAMBA_ROOT_PREFIX="$HOME/micromamba"
eval "$(micromamba shell hook -s posix)"

Steps to reproduce 1.1) Initial environment looks like

[environments.txt](https://github.com/mamba-org/mamba/files/14154424/environments.txt)

1.2) Execute micromamba env create -f ./conda/linux_env.yaml Note: Even if I create .mamba/pkgs at this point, at later stage I will still reproduce the issue

conda-forge/noarch                                  13.4MB @  47.7MB/s  0.3s
conda-forge/linux-64                                32.2MB @  36.2MB/s  1.0s

error    libmamba Could not lock non-existing path '/home/pandora/.mamba/pkgs'

Transaction

  Prefix: /home/pandora/micromamba/envs/linux

  Updating specs:

   - rattler-build
   - valgrind


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

  + _libgcc_mutex         0.1  conda_forge  conda-forge       3kB
  + _openmp_mutex         4.5  2_gnu        conda-forge      24kB
  + ca-certificates  2024.2.2  hbcca054_0   conda-forge     155kB
  + libgcc-ng          13.2.0  h807b86a_5   conda-forge     771kB
  + libgomp            13.2.0  h807b86a_5   conda-forge     420kB
  + libstdcxx-ng       13.2.0  h7e041cc_5   conda-forge       4MB
  + libzlib            1.2.13  hd590300_5   conda-forge      62kB
  + openssl             3.2.1  hd590300_0   conda-forge       3MB
  + rattler-build       0.8.1  h614bb76_0   conda-forge       7MB
  + valgrind           3.22.0  hcd5def8_0   conda-forge      54MB
  + zlib               1.2.13  hd590300_5   conda-forge      93kB

  Summary:

  Install: 11 packages

  Total download: 69MB

2.1) We mow add one package to environment file

name: linux
channels:
  - conda-forge
  - nodefaults
dependencies:
  - rattler-build
  - valgrind
  - gxx_linux-64=13.*

2.2) Now we execute micromamba env update -f ./conda/linux_env.yaml --prune. Packages are correctly installed

Install:
─────────────────────────────────────────────────────────────────────────────

  + binutils_impl_linux-64       2.40  hf600244_0    conda-forge     Cached
  + binutils_linux-64            2.40  hbdbef99_2    conda-forge     Cached
  + gcc_impl_linux-64          13.2.0  h338b0a0_5    conda-forge     Cached
  + gcc_linux-64               13.2.0  h112eaf3_2    conda-forge     Cached
  + gxx_impl_linux-64          13.2.0  h338b0a0_5    conda-forge     Cached
  + gxx_linux-64               13.2.0  hc53e3bf_2    conda-forge     Cached
  + kernel-headers_linux-64    2.6.32  he073ed8_16   conda-forge     Cached
  + ld_impl_linux-64             2.40  h41732ed_0    conda-forge     Cached
  + libgcc-devel_linux-64      13.2.0  ha9c7c90_105  conda-forge     Cached
  + libsanitizer               13.2.0  h7e041cc_5    conda-forge     Cached
  + libstdcxx-devel_linux-64   13.2.0  ha9c7c90_105  conda-forge     Cached
  + sysroot_linux-64             2.12  he073ed8_16   conda-forge     Cached

  Summary:

  Install: 12 packages

3.1) Remove the package which we just added and run again

name: linux
channels:
  - conda-forge
  - nodefaults
dependencies:
  - rattler-build
  - valgrind

3.2) Run again micromamba env update -f ./conda/linux_env.yaml --prune. Package is successfully removed

 Remove:
─────────────────────────────────────────────────────────────────────────────

  - binutils_impl_linux-64       2.40  hf600244_0    conda-forge     Cached
  - binutils_linux-64            2.40  hbdbef99_2    conda-forge     Cached
  - gcc_impl_linux-64          13.2.0  h338b0a0_5    conda-forge     Cached
  - gcc_linux-64               13.2.0  h112eaf3_2    conda-forge     Cached
  - gxx_impl_linux-64          13.2.0  h338b0a0_5    conda-forge     Cached
  - gxx_linux-64               13.2.0  hc53e3bf_2    conda-forge     Cached
  - kernel-headers_linux-64    2.6.32  he073ed8_16   conda-forge     Cached
  - ld_impl_linux-64             2.40  h41732ed_0    conda-forge     Cached
  - libgcc-devel_linux-64      13.2.0  ha9c7c90_105  conda-forge     Cached
  - libsanitizer               13.2.0  h7e041cc_5    conda-forge     Cached
  - libstdcxx-devel_linux-64   13.2.0  ha9c7c90_105  conda-forge     Cached
  - sysroot_linux-64             2.12  he073ed8_16   conda-forge     Cached

4.1) Add again the same package back to env file

name: linux
channels:
  - conda-forge
  - nodefaults
dependencies:
  - rattler-build
  - valgrind
  - gxx_linux-64=13.*

4.2) Run again micromamba env update -f ./conda/linux_env.yaml --prune. Package is installed correctly again

 Install:
─────────────────────────────────────────────────────────────────────────────

  + binutils_impl_linux-64       2.40  hf600244_0    conda-forge     Cached
  + binutils_linux-64            2.40  hbdbef99_2    conda-forge     Cached
  + gcc_impl_linux-64          13.2.0  h338b0a0_5    conda-forge     Cached
  + gcc_linux-64               13.2.0  h112eaf3_2    conda-forge     Cached
  + gxx_impl_linux-64          13.2.0  h338b0a0_5    conda-forge     Cached
  + gxx_linux-64               13.2.0  hc53e3bf_2    conda-forge     Cached
  + kernel-headers_linux-64    2.6.32  he073ed8_16   conda-forge     Cached
  + ld_impl_linux-64             2.40  h41732ed_0    conda-forge     Cached
  + libgcc-devel_linux-64      13.2.0  ha9c7c90_105  conda-forge     Cached
  + libsanitizer               13.2.0  h7e041cc_5    conda-forge     Cached
  + libstdcxx-devel_linux-64   13.2.0  ha9c7c90_105  conda-forge     Cached
  + sysroot_linux-64             2.12  he073ed8_16   conda-forge     Cached

  Summary:

  Install: 12 packages

  Total download: 0 B
  1. Try to run the same command again. It will fail now
micromamba env update -f ./conda/linux_env.yaml --prune
conda-forge/linux-64                                        Using cache
conda-forge/noarch                                          Using cache

critical libmamba Could not solve for environment specs

mamba info / micromamba info

libmamba version : 2.0.0
     micromamba version : 2.0.0
           curl version : libcurl/8.5.0 OpenSSL/3.2.1 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 : /home/pandora/micromamba/envs
          package cache : /home/pandora/micromamba/pkgs
                          /home/pandora/.mamba/pkgs
            environment : linux (active)
           env location : /home/pandora/micromamba/envs/linux
      user config files : /home/pandora/.mambarc
 populated config files : /app/cpp_training_flakes/.mambarc
       virtual packages : __unix=0=0
                          __linux=6.5.0=0
                          __glibc=2.35=0
                          __archspec=1=x86_64-v3
                          __cuda=12.2=0
               channels : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://conda.anaconda.org/nodefaults/linux-64
                          https://conda.anaconda.org/nodefaults/noarch
       base environment : /home/pandora/micromamba
               platform : linux-64

Logs

No response

environment.yml

name: linux
channels:
  - conda-forge
  - nodefaults
dependencies:
  - rattler-build
  - valgrind
# - gcc_linux-64=13.*

~/.condarc

channels:
  - conda-forge
  - nodefaults

auto_activate_base: false
channel_priority: strict

brano543 avatar Feb 03 '24 22:02 brano543