Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

micromamba update does not work for lock files #2797

Open
2 tasks done
pete-machine opened this issue Aug 29, 2023 · 3 comments
Open
2 tasks done

micromamba update does not work for lock files #2797

pete-machine opened this issue Aug 29, 2023 · 3 comments

Comments

@pete-machine
Copy link

pete-machine commented Aug 29, 2023

Troubleshooting docs

  • My problem is not solved in the Troubleshooting docs

How did you install Mamba?

Micromamba

Search tried in issue tracker

micromamba update lock file

Latest version of Mamba

  • My problem is not solved with the latest version

Tried in Conda?

Not applicable

Describe your issue

Running micromamba update --name test_env --file conda-lock.yml does not update libraries of the environment.
Running the command will display a "Nothing to do" message even if conda-lock.yml contains new and updated packages.

I provide the following examples to reproduce the error:

  1. First I create two environment files (named env_0.yml and env_1.yml).
    Note: that env_1.yml contains both a new package (tqdm) and an updated version of click.
# env_0.yml
name: my_env
channels:
  - conda-forge
dependencies:
  - python
  - click=8.0.0
# env_1.yml
name: my_env
channels:
  - conda-forge
dependencies:
  - python
  - click=8.0.4
  - tqdm
  1. Create lock files for each env-file (named conda0-lock.yml and conda1-lock.yml)
conda-lock --micromamba --file env_0.yml  --platform linux-64 && mv conda-lock.yml conda0-lock.yml
conda-lock --micromamba --file env_1.yml  --platform linux-64 && mv conda-lock.yml conda1-lock.yml
  1. Create the initial environment with the initial lock file (conda0-lock.yml)
    micromamba create --name test_env --file conda0-lock.yml
  2. Now update the environment using the "updated" lock file (conda1-lock.yml)
    micromamba update --name test_env --file conda1-lock.yml --prune

In the final step, I expect the environment to be updated, because the updated lock file contains both a new package tqdm and a package update click=8.0.0 --> click=8.0.4, but nothing happens. The environment is not updated and a "nothing to do" is printed in the terminal.

mamba info / micromamba info

       libmamba version : 1.5.0
     micromamba version : 1.5.0
           curl version : libcurl/7.88.1 OpenSSL/3.1.2 zlib/1.2.13 zstd/1.5.2 libssh2/1.11.0 nghttp2/1.52.0
     libarchive version : libarchive 3.6.2 zlib/1.2.13 bz2lib/1.0.8 libzstd/1.5.2
       envs directories : /home/petemachine/micromamba/envs
          package cache : /home/petemachine/micromamba/pkgs
                          /home/petemachine/.mamba/pkgs
            environment : test_env (active)
           env location : /home/petemachine/micromamba/envs/test_env
      user config files : /home/petemachine/.mambarc
 populated config files : /home/petemachine/.condarc
       virtual packages : __unix=0=0
                          __linux=5.15.0=0
                          __glibc=2.31=0
                          __archspec=1=x86_64
                          __cuda=11.4=0
               channels : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
       base environment : /home/petemachine/micromamba
               platform : linux-64

Logs

The output when running micromamba update --name test_env --file conda1-lock.yml --prune

conda-forge/noarch                                  12.2MB @   6.4MB/s  2.0s
conda-forge/linux-64                                29.9MB @  10.3MB/s  3.0s

Pinned packages:
  - python 3.9.*

Transaction

  Prefix: /home/petemachine/micromamba/envs/test_env

  Nothing to do


Transaction starting

Transaction finished

To activate this environment, use:

    micromamba activate test_env

Or to execute a single command in this environment, use:

    micromamba run -n test_env mycommand

environment.yml

No response

~/.condarc

No response

@pete-machine
Copy link
Author

pete-machine commented Aug 29, 2023

I should also mention

 # Using a regular dependencies file works as expected. 
micromamba update --name test_env --file env_1.yml --prune  # THIS WORKS

# Installing the environment from scratch using a lock file works as expected
micromamba create --name test_env --file conda1-lock.yml  # THIS WORKS

@jonashaag
Copy link
Contributor

I think there are similar issues already reported. IIRC the underlying problem is that update does not automatically update to the latest version if all constraints are already satisfied

@pete-machine
Copy link
Author

pete-machine commented Aug 30, 2023

Are you considering this issue: #1455 ?
You mention a similar issue in a comment #1455 (comment) . However, I believe it to be a different issue. According to what I have tested a regular yml file works, while a lockfile does not.

 # Using a regular dependencies file works as expected. 
micromamba update --name test_env --file env_1.yml --prune  # THIS WORKS

 # Using a lock file does not work
micromamba update --name test_env --file conda1-lock.yml --prune  # THIS IS NOT WORKING

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants