Closed jaimergp closed 1 year ago
I ran into the same issue:
$ conda create -y -n myapp python=3.10 flask
$ conda list -n myapp | grep flask
flask 2.2.2 pyhd8ed1ab_0 conda-forge
$ conda update -n myapp --quiet --solver classic flask
# All requested packages already installed.
$ conda update -n myapp --quiet --solver libmamba flask
The following packages will be DOWNGRADED:
flask 2.2.2-pyhd8ed1ab_0 --> 2.2.1-pyhd8ed1ab_0
This is with conda 22.11.1 and conda-libmamba-solver 22.12.0
@beenje that is a really helpful example. I was able to reproduce. To help here are the libsolve instructions which might help to resolve. I've been spending some time trying to better understand the logic that https://github.com/conda/conda-libmamba-solver/blob/main/conda_libmamba_solver/solver.py#L332 does which is the state presented to libsolve.
conda create -y -n myapp python=3.10 flask
task: INSTALL 256
- flask
- python=3.10
$ conda list -n myapp | grep flask
flask 2.2.3 pyhd8ed1ab_0 conda-forge
$ conda update -n myapp --quiet --solver libmamba flask
Stage 1
USERINSTALLED 2560
- conda-forge/noarch::flask==2.2.3=pyhd8ed1ab_0
- conda-forge/linux-64::python==3.10.9=he550d4f_0_cpython
- conda-forge/linux-64::ca-certificates==2022.12.7=ha878542_0
- conda-forge/linux-64::openssl==3.1.0=h0b41bf4_0
task: UPDATE | ESSENTIAL 131840
- flask!=2.2.3
- conda-forge/linux-64::python==3.10.9=he550d4f_0_cpython
- ca-certificates
- openssl
The following packages will be downloaded:
package | build
---------------------------|-----------------
flask-2.2.2 | pyhd8ed1ab_0 74 KB conda-forge
------------------------------------------------------------
Total: 74 KB
The following packages will be DOWNGRADED:
flask 2.2.3-pyhd8ed1ab_0 --> 2.2.2-pyhd8ed1ab_0
Checklist
What happened?
Using the
gvleobas
environment on win-64,conda update python
reports "already satisfied" right away withclassic
. However, withlibmamba
, it tries to solve anyway and comes up with a downgrade: from Python 3.9.10 to Python 3.9.9.This is the kind of subtle behaviour we try to work around with the "last resort" exceptions.
libmamba
often recognizes an environment as already satisfied, whileclassic
does not, so we added those clauses to force the change. However, in this case, it's the opposite!We need to find a balance and appropriate counter-cases.
Conda info
Conda config
Conda list
Additional Context
https://github.com/conda-incubator/conda-libmamba-solver/pull/7#issuecomment-1046744617