prefix-dev / pixi

Package management made easy
https://pixi.sh
BSD 3-Clause "New" or "Revised" License
2.26k stars 135 forks source link

pixi should help user with missing project channel #1452

Open nichmor opened 1 month ago

nichmor commented 1 month ago

Problem description

[project]
name = "torchaudio"
channels = ["conda-forge"]

[tasks]

[dependencies]
captum = {version="*", channel="pytorch"}

While trying to install this small example, we will have following error:

(default) graf@Nichitas-MacBook-Pro torchaudio % pixi install
  × failed to solve the conda requirements of 'default' 'osx-arm64'
  ╰─▶ Cannot solve the request because of: The following packages are incompatible
      └─ captum * cannot be installed because there are no viable options:
         └─ captum 0.4.1 | 0.4.1 | 0.5.0 | 0.6.0 is excluded because candidate not in requested channel: 'pytorch'

I think pixi should help user in this case and hint that pytorch should be added in project channels.

ruben-arts commented 1 month ago

It should, especially when defined in the pixi add command.

pixi add pytroch::captum
olivier-lacroix commented 1 month ago

Shouldn’t this be picked up in the manifest validation function?