mamba-org / mamba

The Fast Cross-Platform Package Manager
https://mamba.readthedocs.io
BSD 3-Clause "New" or "Revised" License
6.74k stars 347 forks source link

micromamba: update does not install all packages (bug/documentation) #2196

Open YYYasin19 opened 1 year ago

YYYasin19 commented 1 year ago

Troubleshooting docs

Search tried in issue tracker

micromamba update does not install all packages

Latest version of Mamba

Tried in Conda?

Not applicable

Describe your issue

When I use micromamba to update an environment, it does tell me that all requested packages are installed. But when I then execute micromamba list, some of the packages are missing.

I have tried to reproduce the issue with the mamba/environment-dev.yml file in this repo.

$ micromamba create -n test-env
$ micromamba activate test-env
# ... other work, maybe some other packages, now want to add the mamba packages
$ micromamba update -f mamba/environment-dev.yml # first mistake, as this will use mamba-dev as env. name
$ micromamba update -f mamba/environment-dev.yml -n test-env # this installs _some_ packages
# ⚠️ here comes the problem, not all the specs are considered
$ micromamba install -f mamba/environment-dev.yml -n test-env # works

I don't think this has to be wrong/broken. I just think there should be some documentation or hint for the user when to use which command. Is update only for updating packages? Why does it install some packages and not others, then?

-- Please feel free to point me to pre-existing issues; I couldn't find anything at first glance.

mamba info / micromamba info

➜ mm info                                                                                                                                                      (test-env)

                                           __
          __  ______ ___  ____ _____ ___  / /_  ____ _
         / / / / __ `__ \/ __ `/ __ `__ \/ __ \/ __ `/
        / /_/ / / / / / / /_/ / / / / / / /_/ / /_/ /
       / .___/_/ /_/ /_/\__,_/_/ /_/ /_/_.___/\__,_/
      /_/

            environment : test-env (active)
           env location : /Users/ytatar/micromamba/envs/test-env
      user config files : /Users/ytatar/.mambarc
 populated config files : /Users/ytatar/.condarc
       libmamba version : 1.0.0
     micromamba version : 1.0.0
           curl version : libcurl/7.86.0 SecureTransport (OpenSSL/1.1.1s) zlib/1.2.13 libssh2/1.10.0 nghttp2/1.47.0
     libarchive version : libarchive 3.6.1 zlib/1.2.13 bz2lib/1.0.8 libzstd/1.5.2
       virtual packages : __unix=0=0
                          __osx=13.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
       base environment : /Users/ytatar/micromamba
               platform : osx-arm64

Logs

__
          __  ______ ___  ____ _____ ___  / /_  ____ _
         / / / / __ `__ \/ __ `/ __ `__ \/ __ \/ __ `/
        / /_/ / / / / / / /_/ / / / / / / /_/ / /_/ /
       / .___/_/ /_/ /_/\__,_/_/ /_/ /_/_.___/\__,_/
      /_/

info     libmamba Parsing MatchSpec cxx-compiler
info     libmamba Parsing MatchSpec cmake
info     libmamba Parsing MatchSpec ninja
info     libmamba Parsing MatchSpec nlohmann_json
info     libmamba Parsing MatchSpec libsolv >=0.7.18
info     libmamba Parsing MatchSpec libarchive
info     libmamba Parsing MatchSpec libsodium
info     libmamba Parsing MatchSpec libcurl >=7.86
info     libmamba Parsing MatchSpec gtest
info     libmamba Parsing MatchSpec gmock
info     libmamba Parsing MatchSpec cpp-expected
info     libmamba Parsing MatchSpec reproc-cpp
info     libmamba Parsing MatchSpec yaml-cpp
info     libmamba Parsing MatchSpec cli11 >=2.2
info     libmamba Parsing MatchSpec spdlog
info     libmamba Parsing MatchSpec fmt
info     libmamba Parsing MatchSpec pybind11
info     libmamba Parsing MatchSpec pybind11-stubgen
info     libmamba Parsing MatchSpec pytest
info     libmamba Parsing MatchSpec pyyaml
info     libmamba Parsing MatchSpec conda
info     libmamba Searching index cache file for repo 'https://conda.anaconda.org/conda-forge/osx-arm64/repodata.json'
info     libmamba Found cache at '/Users/ytatar/micromamba/pkgs/cache/a850f475.json'
conda-forge/osx-arm64                                       Using cache
info     libmamba Searching index cache file for repo 'https://conda.anaconda.org/conda-forge/noarch/repodata.json'
info     libmamba Found cache at '/Users/ytatar/micromamba/pkgs/cache/09cdf8bf.json'
conda-forge/noarch                                          Using cache
info     libmamba Searching index cache file for repo 'https://repo.anaconda.com/pkgs/main/osx-arm64/repodata.json'
info     libmamba Found cache at '/Users/ytatar/micromamba/pkgs/cache/9e99ffaf.json'
pkgs/main/osx-arm64                                         Using cache
info     libmamba Searching index cache file for repo 'https://repo.anaconda.com/pkgs/main/noarch/repodata.json'
info     libmamba Found cache at '/Users/ytatar/micromamba/pkgs/cache/3e39a7aa.json'
pkgs/main/noarch                                            Using cache
info     libmamba Searching index cache file for repo 'https://repo.anaconda.com/pkgs/r/osx-arm64/repodata.json'
info     libmamba Found cache at '/Users/ytatar/micromamba/pkgs/cache/8bd55712.json'
pkgs/r/osx-arm64                                            Using cache
info     libmamba Searching index cache file for repo 'https://repo.anaconda.com/pkgs/r/noarch/repodata.json'
info     libmamba Found cache at '/Users/ytatar/micromamba/pkgs/cache/4ea078d6.json'
pkgs/r/noarch                                               Using cache
info     libmamba All targets to download are cached
info     libmamba Reading cache files '/Users/ytatar/micromamba/pkgs/cache/a850f475.*' for repo index 'https://conda.anaconda.org/conda-forge/osx-arm64'
info     libmamba Reading cache files '/Users/ytatar/micromamba/pkgs/cache/09cdf8bf.*' for repo index 'https://conda.anaconda.org/conda-forge/noarch'
info     libmamba Reading cache files '/Users/ytatar/micromamba/pkgs/cache/9e99ffaf.*' for repo index 'https://repo.anaconda.com/pkgs/main/osx-arm64'
info     libmamba Reading cache files '/Users/ytatar/micromamba/pkgs/cache/3e39a7aa.*' for repo index 'https://repo.anaconda.com/pkgs/main/noarch'
info     libmamba Reading cache files '/Users/ytatar/micromamba/pkgs/cache/8bd55712.*' for repo index 'https://repo.anaconda.com/pkgs/r/osx-arm64'
info     libmamba Reading cache files '/Users/ytatar/micromamba/pkgs/cache/4ea078d6.*' for repo index 'https://repo.anaconda.com/pkgs/r/noarch'
info     libmamba Loading single package record: "/Users/ytatar/micromamba/envs/test-env/conda-meta/ncurses-6.3-h07bb92c_1.json"
info     libmamba Loading single package record: "/Users/ytatar/micromamba/envs/test-env/conda-meta/krb5-1.20.1-h69eda48_0.json"
info     libmamba Loading single package record: "/Users/ytatar/micromamba/envs/test-env/conda-meta/c-ares-1.18.1-h3422bc3_0.json"
info     libmamba Loading single package record: "/Users/ytatar/micromamba/envs/test-env/conda-meta/libev-4.33-h642e427_1.json"
info     libmamba Loading single package record: "/Users/ytatar/micromamba/envs/test-env/conda-meta/ca-certificates-2022.12.7-h4653dfc_0.json"
info     libmamba Loading single package record: "/Users/ytatar/micromamba/envs/test-env/conda-meta/openssl-3.0.7-h03a7124_1.json"
info     libmamba Loading single package record: "/Users/ytatar/micromamba/envs/test-env/conda-meta/libcurl-7.87.0-h9049daf_0.json"
info     libmamba Loading single package record: "/Users/ytatar/micromamba/envs/test-env/conda-meta/libnghttp2-1.47.0-h519802c_1.json"
info     libmamba Loading single package record: "/Users/ytatar/micromamba/envs/test-env/conda-meta/libzlib-1.2.13-h03a7124_4.json"
info     libmamba Loading single package record: "/Users/ytatar/micromamba/envs/test-env/conda-meta/libcxx-14.0.6-h2692d47_0.json"
info     libmamba Loading single package record: "/Users/ytatar/micromamba/envs/test-env/conda-meta/libsolv-0.7.23-hb5ab8b9_0.json"
info     libmamba Loading single package record: "/Users/ytatar/micromamba/envs/test-env/conda-meta/libedit-3.1.20191231-hc8eb9b7_2.json"
info     libmamba Loading single package record: "/Users/ytatar/micromamba/envs/test-env/conda-meta/libssh2-1.10.0-h7a5bd25_3.json"
info     libmamba Loading single package record: "/Users/ytatar/micromamba/envs/test-env/conda-meta/cli11-2.3.1-hb7217d7_0.json"
info     libmamba Adding package record to repo __archspec
info     libmamba Adding package record to repo __osx
info     libmamba Adding package record to repo __unix
info     libmamba Adding package record to repo c-ares
info     libmamba Adding package record to repo ca-certificates
info     libmamba Adding package record to repo cli11
info     libmamba Adding package record to repo krb5
info     libmamba Adding package record to repo libcurl
info     libmamba Adding package record to repo libcxx
info     libmamba Adding package record to repo libedit
info     libmamba Adding package record to repo libev
info     libmamba Adding package record to repo libnghttp2
info     libmamba Adding package record to repo libsolv
info     libmamba Adding package record to repo libssh2
info     libmamba Adding package record to repo libzlib
info     libmamba Adding package record to repo ncurses
info     libmamba Adding package record to repo openssl
info     libmamba Parsing MatchSpec cxx-compiler
info     libmamba Parsing MatchSpec cxx-compiler
info     libmamba Parsing MatchSpec cmake
info     libmamba Parsing MatchSpec cmake
info     libmamba Parsing MatchSpec ninja
info     libmamba Parsing MatchSpec ninja
info     libmamba Parsing MatchSpec nlohmann_json
info     libmamba Parsing MatchSpec nlohmann_json
info     libmamba Parsing MatchSpec libsolv >=0.7.18
info     libmamba Parsing MatchSpec libsolv >=0.7.18
info     libmamba Parsing MatchSpec libarchive
info     libmamba Parsing MatchSpec libarchive
info     libmamba Parsing MatchSpec libsodium
info     libmamba Parsing MatchSpec libsodium
info     libmamba Parsing MatchSpec libcurl >=7.86
info     libmamba Parsing MatchSpec libcurl >=7.86
info     libmamba Parsing MatchSpec gtest
info     libmamba Parsing MatchSpec gtest
info     libmamba Parsing MatchSpec gmock
info     libmamba Parsing MatchSpec gmock
info     libmamba Parsing MatchSpec cpp-expected
info     libmamba Parsing MatchSpec cpp-expected
info     libmamba Parsing MatchSpec reproc-cpp
info     libmamba Parsing MatchSpec reproc-cpp
info     libmamba Parsing MatchSpec yaml-cpp
info     libmamba Parsing MatchSpec yaml-cpp
info     libmamba Parsing MatchSpec cli11 >=2.2
info     libmamba Parsing MatchSpec cli11 >=2.2
info     libmamba Parsing MatchSpec spdlog
info     libmamba Parsing MatchSpec spdlog
info     libmamba Parsing MatchSpec fmt
info     libmamba Parsing MatchSpec fmt
info     libmamba Parsing MatchSpec pybind11
info     libmamba Parsing MatchSpec pybind11
info     libmamba Parsing MatchSpec pybind11-stubgen
info     libmamba Parsing MatchSpec pybind11-stubgen
info     libmamba Parsing MatchSpec pytest
info     libmamba Parsing MatchSpec pytest
info     libmamba Parsing MatchSpec pyyaml
info     libmamba Parsing MatchSpec pyyaml
info     libmamba Parsing MatchSpec conda
info     libmamba Parsing MatchSpec conda
info     libmamba Problem count: 0
info     libmamba No python version given to TransactionContext, leaving it empty
Transaction

  Prefix: /Users/ytatar/micromamba/envs/test-env

  All requested packages already installed

info     libmamba Cleaned 0 .mamba_trash files. 0 remaining.

Transaction starting
info     libmamba All targets to download are cached
info     libmamba Waiting for pyc compilation to finish
Transaction finished
info     libmamba Opening history file: "/Users/ytatar/micromamba/envs/test-env/conda-meta/history"
info     libmamba Freeing transaction.
info     libmamba Freeing solver.
info     libmamba Freeing pool.

environment.yml

name: mamba-dev
channels:
  - conda-forge
dependencies:
  - cxx-compiler
  - cmake
  - ninja
  - nlohmann_json
  - libsolv >=0.7.18
  - libarchive
  - libsodium
  - libcurl >=7.86
  - gtest
  - gmock
  - cpp-expected
  - reproc-cpp
  - yaml-cpp
  - cli11 >=2.2
  - spdlog
  - fmt
  - pybind11
  - pybind11-stubgen
  - pytest
  - pyyaml
  - conda
  - sel(win): winreg

~/.condarc

auto_activate_base: false
channels:
  - conda-forge
  - defaults
local_repodata_ttl: 100000
jonashaag commented 1 year ago

update has very confusing behavior IMO, at some point we should invest some time fixing that. I think I have at least 1 other related issue reported.

speleo3 commented 1 year ago

I think I just ran into the same issue. update installs all packages which have a version specified, and ignores the rest!