Skip to content

For packages from PyPI conda-lock does not fall back to older, viable versions #894

@imLew

Description

@imLew

Checklist

  • I added a descriptive title
  • I searched open reports and couldn't find a duplicate

What happened?

Context: a PyPI dependency in my conda env requires a major version of a recently updated package.
(The package in question is dark-matter and the requirement is mysql-connector-python>=9.0.0, on Jan 21st 2026 version 9.6.0 was released on PyPI.)

conda-lock fails with RuntimeError: Unable to find installation candidates for mysql-connector-python (9.6.0)
When I try with conda env create --file version 9.5.0 of the package is installed.

Since conda also doesn't install 9.6.0, it seems that there really is some issue that's not related to conda-lock, however, unlike conda, it is not able to figure out that there are version available that satisfy the requirements.

Additional Context

conda-lock installed from PyPI with uv

$ uv run conda-lock --version
conda-lock, version 4.0.0
$ mamba --version
2.5.0
$ conda --version
conda 25.11.1

A minimal conda-env.yml that can be used to produce the result:

channels:
  - conda-forge
dependencies:
  - pip
  - pip:
      - dark-matter

uv run conda-lock lock -k explicit --filename-template "{platform}-{input-hash}.conda-lock.txt" -f conda-env.yml -p linux-64

I also tried with -p osx-64, but got the same error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions