-
Notifications
You must be signed in to change notification settings - Fork 26
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
conda env update --prune does not install require dependencies #595
Comments
Thanks for this issue and for providing instructions on how to recreate 🙏. Unfortunately, I was not able to reproduce this error on my macOS laptop using the We will need to wait for someone to try and recreate this on a Windows machine to proceed. |
I'm running into same error while Setup to replicate the errorDockerfile:
Environment.yml:
Docker command: Output:
WorkaroundRemoving the Fixed Dockerfile:
Output:
System infoFrom @travishathaway I assume that the OS might have impact on the behavior. My testing is run on Linux with x86_64. Additional infoMy build broke over time without changes on my build process. My previous successful build has used Conda 24.11.0, and the broken build uses Conda 24.11.2. However, there are other automatically upgrading sources that might have also caused my issue. |
Not sure how recent, but it is a recent regression. It was working fine for me a few weeks ago when I built those environment files. I just checked on an ubuntu machine, a mac, and two windows machines (all after a conda upgrade --all in the base environment) and it fails on all. I tried downgrading conda-libmamba-solver, and that solves the problem, so it is one one of the new mamba solver packages (I don't understand enough how the solver works so not sure how to track it down) conda install conda-libmamba-solver=24.9.0 The following packages will be DOWNGRADED: conda-libmamba-so~ 24.11.1-pyhd8ed1ab_0 --> 24.9.0-pyhd8ed1ab_0 |
Thanks for the additional information. I am now able to reliably recreate this issue. I can also report that this does not happen when using the |
I thought
|
The way I am reading the help, the way it behaved up to the last version (and based on @travishathaway, how the classic solver behaves) --prune means remove packages installed by previous version of environment.yml or manually installed packages if they no longer appear in the environment.yml, but do install direct dependencies, otherwise you have a broken environment. That is, replace the current state of the environment with what a new environment created with the given yml would look like (ok, almost, read the last paragraph as well as to how I ended up with a second environment file + prune) Without --prune, leave everything already installed alone, unless there is a direct conflict requiring an update. This behavior is useful when managing a team software development and you want to make sure that everyone is using the same environment even when packages were removed along the way. I do not see a scenario where I would want to create an environment without dependencies, and if I did, I would for a nodeps options, or something similar. The reason I was using this in the first place was that creating a new environment with pip packages specified, first installed the dependencies of the conda packages, and then ignored the pip specification if they were already installed as conda packaged decencies. , This required creating a minimal environment with only the pip packages and then updating the environment with the full specification on top of that (I need pyside6 from pip as the conda version does not include webengine, but having pyqtgraph in the environment file installs the conda pyside6 and then ignores the pip section). That one sounded more like a feature, or at least open to debate as to whether it was a bug. |
Ah wait I had misread your reproducer. I thought you |
Opened #596 with a change that fixes the issue and reproducer tests. Let's see if there's an impact in other parts of the test suite. |
Checklist
What happened?
When updating packages in the environment with
Dependencies are not installed resulting with a broken environment.
As a simple test case, define the
environment.yml
asThen
import fails because numpy does not have required dependencies. If instead this is run without the --prune option it works
Conda Info
Conda Config
Conda list
Additional Context
No response
The text was updated successfully, but these errors were encountered: