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

mamba resolves an environment while conda throws a conflict #559

Closed
183amir opened this issue Oct 28, 2020 · 13 comments
Closed

mamba resolves an environment while conda throws a conflict #559

183amir opened this issue Oct 28, 2020 · 13 comments

Comments

@183amir
Copy link

183amir commented Oct 28, 2020

I am running this command:

$ conda create -n temp --override-channels \
-c https://www.idiap.ch/software/bob/conda -c defaults \
--strict-channel-priority --dry-run \         
python=3.6 \
boost=1.73.0 \
click=7.1.2 \
click-plugins=1.1.1 \
cmake=3.14.0 \
coverage=5.3 \
docopt=0.6.2 \
ffmpeg=4.2.2 \
freetype=2.10.4 \
giflib=5.2.1 \
h5py=2.8.0 \
hdf5=1.10.2 \
jinja2=2.11.2 \
jpeg=9b \
libblitz=1.0.1 \
libpng=1.6.37 \
libsvm=3.24 \
libtiff=4.1.0 \
matplotlib=3.3.2 \
mkl=2020.2 \
nose=1.3.7 \
numpy=1.19.2 \
pandas=1.1.3 \
pillow=8.0.1 \
pkg-config=0.29.2 \
pybind11=2.5.0 \
pytorch=1.7.0 \
pyyaml=5.3.1 \
requests=2.24.0 \
schema=0.7.2 \
scikit-image=0.17.2 \
scikit-learn=0.23.2 \
scipy=1.5.2 \
setuptools=50.3.0 \
sox=14.4.2 \
sphinx=3.2.1 \
sphinx_rtd_theme=0.4.3 \
sphinxcontrib-programoutput=0.16 \
sqlalchemy=1.3.20 \
tabulate=0.8.7 \
tensorflow=2.1.0 \
torchvision=0.8.1 \
tqdm=4.50.2 \
vlfeat=0.9.21 \
zc.buildout=2.13.3 \
zc.recipe.egg=2.0.7 \
termcolor=1.1.0 \
psycopg2=2.8.5 \
docker-py jsonschema ncurses \
python-graphviz pyzmq simplejson sphinxcontrib-httpdomain

and conda cannot resolve this environment.
However, mamba can resolve this which is weird.

Usually I use mamba to figure out the source of conflicts but I cannot use mamba to tell you what is wrong this time because mamba seems to resolve this environment! What could be the issue here?

@183amir
Copy link
Author

183amir commented Oct 28, 2020

This may actually be a conda bug! This fails:

conda create -n temp --override-channels \
-c https://www.idiap.ch/software/bob/conda -c defaults \
--dry-run --strict-channel-priority pytorch

but this works:

conda create -n temp --override-channels \
-c https://www.idiap.ch/software/bob/conda -c defaults \
--dry-run --strict-channel-priority pytorch cpuonly

@183amir 183amir closed this as completed Oct 28, 2020
@wolfv
Copy link
Member

wolfv commented Oct 28, 2020

Ah, pytorch still uses the broken conda track features, which also makes it slightly incompatible with mamba as we don't respect them. There is an open issue for that

@183amir
Copy link
Author

183amir commented Oct 29, 2020

Are conda features deprecated? What should be used instead?

@wolfv
Copy link
Member

wolfv commented Oct 29, 2020

Mutex packages. Please search the issue I posted more info there and on the pytorch issue I opened

@183amir
Copy link
Author

183amir commented Oct 29, 2020

Could you please tell me which issue? btw I figured that the issue that I'm having here is again this #65 and I can reproduce without pytorch as well.

@183amir
Copy link
Author

183amir commented Oct 29, 2020

Here is a simple command:

conda create -n temp --override-channels \                                                                                                                                     :(
-c https://www.idiap.ch/software/bob/conda -c defaults \
--strict-channel-priority --dry-run ffmpeg=4.2

where conda fails but mamba works (mamba shouldn't resolve this environment).

The problem is both channels have x264 but the one in the bob channel conflicts with ffmpeg in the defaults channel:

mamba search x264                             
Loading channels: done
# Name                       Version           Build  Channel             
x264                        20131217               0  software/bob/conda  
x264                        20131217               1  software/bob/conda  
x264                        20131217               2  software/bob/conda  
x264                        20131217               3  software/bob/conda  
x264                  1!152.20180806      h7b6447c_0  pkgs/main           
x264                  1!157.20191217      h7b6447c_0  pkgs/main           

@183amir
Copy link
Author

183amir commented Oct 29, 2020

And I have the latest version of mamba and libsolv installed:

$ mamba list libsolv                 
libsolv                   0.7.16               h8b12597_0    conda-forge
$ mamba --version
mamba 0.6.4
conda 4.9.0

@183amir
Copy link
Author

183amir commented Oct 29, 2020

I am removing the x264 packages from our channel index in https://gitlab.idiap.ch/bob/bob.devtools/-/merge_requests/177 so you might not be able to reproduce this. Please feel free to copy a x264 tarball from our channel to a temporary channel to be able to reproduce this.

@wolfv wolfv reopened this Oct 29, 2020
@183amir
Copy link
Author

183amir commented Oct 29, 2020

Mutex packages. Please search the issue I posted more info there and on the pytorch issue I opened

Actually come to think about it, I was the one to originally propose the idea :D
conda-forge/staged-recipes#363

@wolfv
Copy link
Member

wolfv commented Oct 29, 2020

👍 conda history!

So the issue is that libsolv is selecting a (strictly) forbidden package when the package from the allowed pool conflicts?

@183amir
Copy link
Author

183amir commented Oct 29, 2020

Yes, that's the issue. x264 should not be selected from the defaults channel at all.

@wolfv
Copy link
Member

wolfv commented Jun 30, 2021

To clarify the issue at hand here is that mamba reaches into lower-priority channels when it finds conflicts in higher prio channels.

Basically, I think we can reproduce this issue with the following setup:

Channel A:

  • pkg-2.0

Channel B:

  • pkg-0.1

Now if we put channel A and B with strict priority, and then request pkg==0.1 I think mamba woudl resolve to pkg-0.1 from the lower prio channel (and conda would probably strictly ignore that package).

@wolfv
Copy link
Member

wolfv commented Jul 6, 2021

Thanks, this should now be fixed on master by properly black listing packages from a lower-prio repo.
We're working on a more proper fix in libsolv itself.

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

No branches or pull requests

2 participants