Skip to content

[question] Override of transitive dependencies #4474

@geoHeil

Description

@geoHeil

Overriding pypi dependencies seems to work like: #3948

however, how can conda dependencies be overwritten? (nvidia-cuda-nvrtc-cu12)

Further from looking at said PR ( #3948 ) how to specify the option for pixi is still a bit unclear for me

[project]
name = "foo"
version = "1.0.0"
description = "bar"
authors = [{ name = "name", email = "[email protected]" }]
requires-python = ">3.12,<3.13"

[tool.pixi.project]
platforms = ["linux-64", "osx-arm64"]
channels = ["conda-forge"]

[tool.pixi.environments]
dev = { features = ["thing-cpu"], solve-group = "thing-cpu" }
dev-gpu = { features = ["thing-gpu"], solve-group = "thing-gpu" }

[tool.pixi.feature.thing-cpu.dependencies]
[tool.pixi.feature.thing-cpu.pypi-dependencies]
torch = { version = "~=2.8.0", index = "https://download.pytorch.org/whl/cpu" }
paddlepaddle = { version = ">=3.1.1,<3.2", index = "https://www.paddlepaddle.org.cn/packages/stable/cpu/" }

[tool.pixi.feature.thing-gpu]
system-requirements = { cuda = "12.9" }
[tool.pixi.feature.thing-gpu.target.linux-64.pypi-dependencies]
torch = { version = "~=2.8.0", index = "https://download.pytorch.org/whl/cu129" }
paddlepaddle-gpu = { version = ">=3.1.1,<3.2", index = "https://www.paddlepaddle.org.cn/packages/stable/cu129/" }

Fails with:

Error:   × failed to solve the pypi requirements of environment 'dev-gpu' for platform 'linux-64'
  ├─▶ failed to resolve pypi dependencies
  ╰─▶ Because only the following versions of torch are available:
          torch<2.8.0
          torch==2.8.0+cu129
      and torch==2.8.0+cu129 depends on nvidia-cuda-nvrtc-cu12{platform_machine == 'x86_64' and sys_platform == 'linux'}==12.9.86, we can conclude that torch>=2.8.0 depends on nvidia-cuda-nvrtc-cu12{platform_machine == 'x86_64' and sys_platform == 'linux'}==12.9.86.
      And because paddlepaddle-gpu==3.1.1 depends on nvidia-cuda-nvrtc-cu12{platform_machine == 'x86_64' and sys_platform == 'linux'}==12.9.41 and only paddlepaddle-gpu<=3.1.1 is available, we can conclude that paddlepaddle-gpu>=3.1.1 and torch>=2.8.0 are incompatible.
      And because you require torch>=2.8.0 and paddlepaddle-gpu>=3.1.1, we can conclude that your requirements are unsatisfiable.

The problem in detail

# Torch
nvidia-cuda-nvrtc-cu12{platform_machine == 'x86_64' and sys_platform == 'linux'}==12.9.86
# PaddlePaddle
nvidia-cuda-nvrtc-cu12{platform_machine == 'x86_64' and sys_platform == 'linux'}==12.9.41

How can I pixi to force resolve with 12.9.86?

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