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 does'nt find a solution when mixing conda-forge/defaults and not specifying Python explicitely #1102

Closed
jolos opened this issue Jul 27, 2021 · 5 comments
Labels
type::question Further information is requested

Comments

@jolos
Copy link

jolos commented Jul 27, 2021

on mamba >= 0.15 the following environment file (adapted from the quetz repo) fails to find a solution and progress to installation of the packages

name: quetz
channels:
  - defaults
  - https://repo.mamba.pm/conda-forge
dependencies:
  #- python>=3.7
  - pip
  - fastapi
  - typer
  - authlib
  - psycopg2
  - httpx=0.16.0
  - sqlalchemy<1.4.0
  - sqlalchemy-utils
  - sqlite
  - python-multipart
  - uvicorn
  - zstandard
  - conda-build
  - appdirs
  - toml
  - quetz-client
  - fsspec
  - requests
  - h2<4.0.0
  - pluggy
  - jinja2
  - itsdangerous
  - alembic
  - zchunk
  - s3fs
  - sphinx
  - sphinx-book-theme
  - tenacity
  - xattr
  - aiofiles
  - pyyaml
  - ujson
  - prometheus_client
  - pamela
  - typing_extensions
  - adlfs

Any of the following actions resolves the issue

  • removing the defaults channel
  • uncommenting the python requirement
  • downgrading to mamba 0.14
  • reducing the number of requirements in the file.
@mparry
Copy link
Contributor

mparry commented Jul 28, 2021

Have you got channel_priority: strict configured? Under mamba 0.15+ you probably want to change that to channel_priority: flexible, or just remove that config altogether since flexible is the default. We saw similar after updating.

This is the relevant bit of the changelog:

Note that this changes the meaning of strict and flexible priority as the previous implementation did not follow conda's semantics. Mamba now has three modes, just like conda: strict, flexible and disabled. Strict will completely disregard any packages from lower-priority channels if a package of the same name exists in a higher priority channel. Flexible will use packages from lower-priority channels if necessary to fulfill dependencies or explicitly requested (e.g. by version number). Disabled will use the highest version number, irregardless of the channel order.

@jolos
Copy link
Author

jolos commented Jul 28, 2021

That doesn't seem to resolve the issue, it persists regardless if I set it to strict/flexible. However setting it to disabled does seem to help. Not sure what the implications of that are.

@adriendelsalle
Copy link
Member

Hi @jolos!

Could you please describe the error you get?
I just tried to reproduce but it works locally on linux-64 even if it's terribly long to solve with conda, mamba or micromamba.
Looks like env create doesn't support channel_priority..

Running micromamba create -f env.yml --strict-channel-priority solves ubber fast.

@adriendelsalle adriendelsalle added the type::question Further information is requested label Jul 30, 2021
@jolos
Copy link
Author

jolos commented Jul 30, 2021

Thanks for checking @adriendelsalle, there's no error showing up, it's just that it indeed it takes terribly long. Perhaps if I would leave it running for a while it would eventually find a solution. But so far I always kill it when I don't see any progress after 20min.
Given that mamba is typically super snappy, to me that feels as a regression compared to 0.14.

I confirm that using micromamba works (both with and without strict-channel-priority) using conda env create work as well.

@TejasAvinashShetty
Copy link

TejasAvinashShetty commented Aug 4, 2021

similar issue here. Just adding python to the list of packages, without altering strict, etc solves the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants