-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 solver does not respect package specifications in the pinned file #9016
Comments
In my humble opinion, it is annoying for conda to prevent things when you are explicitly specifying them. The purpose behind that change is to enforce pins such that conda will never accidentally change those pins, but if you explicitly say otherwise, conda will get out of your way. I'm not really opposed to reverting this behavior, but I would like a lot more detail on your use case. |
I agree with @yhuai, pinning should be respected even if explicit versions are given on the command line. Putting a |
Regarding my use case, we want to have a deterministic way to define Python environments for production workloads. Specifically, we want to make sure that environments built from the same spec are identical no matter when we build those environments. Because it is quite hard to control all of transient dependencies of Python packages, what we are doing is to make the yml file used to create the env only specify top level dependencies that we need (e.g. Python and Numpy) and use a long pinned files to fix the versions of all transient dependencies. We also want to use pinned file to lock down the versions of some critical libraries and fail the request if a user wants to change the version. As @jjhelmus pointed out, because Conda already has --no-pin flag, current Conda 4.7 has two approaches to override versions specified in pinned file. But, it takes away the approach of making pinned file take precedence. |
This is really a lockfile/env spec use case more than anything. I do not see the two override behaviors as equivalent. I'm not going to dedicate my team's time to changing this behavior. Our time is better spent on efforts to improve any kind of lockfile capability. That is on our roadmap for 4Q right now. |
@yhuai yes, that's a good issue. Further developments should be discussed there. |
@msarahan thank you |
Related issue: #9995 |
I also treat this as a bug. conda install matplotlib matplotlib pkgs/main/osx-64::matplotlib-3.3.2-hecd8cb5_0 Like, did I ask for the override? No! I want to keep the requirement of matplotlib==3.2.2, I did not ask for the newer version |
I'm having a hell of a time trying to make pinned work for OpenSSL. Is this also the override or is there still something wrong with the version number? |
I figured out the root of my problem, which was that I had the proxy settings configured incorrectly. Still stands that I was unable to pin the OpenSSL version. |
This is an issue for me as well. Pinning doesn't seem to work at all. If you don't specify the version, it still overrides the pin. If pinning is supposed to not really work, then at the very least there is a documentation bug. |
I meet the same problems in win10 conda64 python3.8 & python 3.9,the pinned file in conda-meta folder was ignoreed or overrided, I hope there will be a good solution |
I am having the same problem using Conda 4.13.0/Python 3.9.13/Mamba 0.24.0 running on CentOS 7.9.2009. I have two PyPI packages installed from source that Conda continuously wants to replace, seemingly no matter what I do with $CONDA_PREFIX/conda-meta/pinned and $CONDA_PREFIX/.condarc. |
Actually, it seems I was wrong - Mamba told me it was going to replace the PyPI packages when I ran |
This should really be classified as a bug, and is still an issue. conda does not respect my pin The documentation clearly states that pinning "prevents packages listed in the pinned file from being updated," which it clearly does not, at least for openssl, making this a bug. |
I have the same issue. This is a huge pain. In my pinned file, I have python set to 3.10.8 but when I run the following commands,
I see that it upgrades python to 3.10.11, which breaks my envrionment.
In my conda requirement file, I am not explicitly installing python 3.10.11, this is an indirect upgrade and pin is not being respected. My pinned file content |
My two cents:
So maybe it's too late for |
I'd suggest fixing this in conda-libmamba-solver, note the difference in behavior to the classic solver in the release notes of conda-libmamba-solver and move on. |
Current Behavior
pinned file in
conda-meta/
folder does not pin packages listed their to the expected version.Steps to Reproduce
conda-meta
folder inmyenv
.This command will not fail like what Conda 4.6 does. Instead it will try to do the following
If you compare this list with the pinned file, you find that ca-certificates's version is also not what gets defined in the pinned file (pinned file has 2019.1.23).
Expected Behavior
If the user-specified version of a package does not meet the spec defined in the pinned file, Conda should fail. Conda 4.6 actually fails with an error like
Also, Conda's solver needs to respect the version specs defined in the pinned file. For example, in the repro section, the version of ca-certificates should be 2019.1.23.
Environment Information
`conda info`
`conda config --show-sources`
This command does not return anything.
`conda list --show-channel-urls`
The text was updated successfully, but these errors were encountered: