pixi icon indicating copy to clipboard operation
pixi copied to clipboard

bug(pypi): panic when trying to resolve cross-platform pypi dependency

Open jcmgray opened this issue 1 year ago • 3 comments

Checks

  • [x] I have checked that this issue has not already been reported.

  • [x] I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

Minimal pixi.toml:

[workspace]
channels = ["conda-forge"]
name = "test"
platforms = ["osx-64"]
version = "0.1.0"

[dependencies]
python = "*"

[pypi-dependencies]
kahypar = "*"

Issue description

If I try to resolve this environment (on linux-64, pixi 0.54.2) I get a panic:

> pixi lock
▪ solving              [━━━━━━━━━━━━━━━━━━━━]  1/1                                                                                               
⠉ updating lock-file   [00:00:01] [────────────────────────────────────────]    0/3                                                              
thread 'main2' panicked at /home/runner/work/pixi/pixi/crates/pixi_core/src/lock_file/resolve/build_dispatch.rs:438:17:
could not initialize build dispatch correctly

thread 'main' panicked at crates/pixi/src/main.rs:49:10:
Tokio executor failed, was there a panic?: Any { .. }

The closest other issue seems to be #4411, but I am new to pixi so not sure if the same.

(Thanks for the wonderful tool!)

Expected behavior

I think the environment is simply not solvable - so a message declaring that and explaining why would be expected.

jcmgray avatar Sep 08 '25 23:09 jcmgray

I can reproduce this error on my linux-64 machine

Hofer-Julian avatar Sep 09 '25 08:09 Hofer-Julian

Yeah there are cases, where we can get a nicer message. I've built that in recently. Using a similar example:

▪ solving              [━━━━━━━━━━━━━━━━━━━━]  1/1
⠙ updating lock-file   [00:00:00] [────────────────────────────────────────]    0/3
  ⠁ default:linux-64     [00:00:00] resolving sdist==0.0.0
thread 'main2' panicked at /Users/runner/work/pixi/pixi/crates/pixi_core/src/lock_file/resolve/build_dispatch.rs:438:17:
  ⠁ default:linux-64     [00:00:00] resolving sdist==0.0.0                                                                                                                                              Error:   × failed to solve the pypi requirements of environment 'default' for platform 'linux-64'
  ╰─▶ build dispatch initialization failed: there is no compatible Python interpreter for 'osx-arm64'

But it seems to not be getting into the panic handler somehow.

tdejager avatar Sep 09 '25 08:09 tdejager

For more details about why we were not able to fix it, please refer to this PR: https://github.com/prefix-dev/pixi/pull/4612

nichtmacho avatar Sep 23 '25 10:09 nichtmacho