Bug Description
I have UV installed outside the pixi environment (in my case with pixi global, but should be a general problem). This was likely introduced in #3165, I think their needs to be a check if the uv is installed inside the pixi environment before trying to use it over pip.
Take the following pixi.toml file.
[workspace]
channels = ["conda-forge"]
name = "maturin-pixi"
platforms = ["linux-64", "osx-arm64", "win-64"]
[tasks]
build = "maturin develop"
[environments]
new-pip = ["maturin-new", "pip"]
new-uv = ["maturin-new", "uv"]
old-pip = ["maturin-old", "pip"]
old-uv = ["maturin-old", "uv"]
[feature.maturin-new.dependencies]
maturin = "==1.13.2"
[feature.maturin-old.dependencies]
maturin = "==1.13.1"
[feature.pip.dependencies]
pip = "*"
[feature.uv.dependencies]
uv = "*"
And run the combination
#!/usr/bin/env bash
set -x
which uv
pixi run -e new-pip build
pixi run -e new-uv build
pixi run -e old-pip build
pixi run -e old-uv build
Will reduce this output:
+ which uv
/home/shh/.local/pixi/bin/uv
+ pixi run -e new-pip build
✨ Pixi task (build in new-pip): maturin develop
🐍 Found CPython 3.14 at /home/shh/projects/maturin-pixi/.pixi/envs/new-pip/bin/python
🔗 Found pyo3 bindings
Compiling pyo3-build-config v0.28.3
Compiling pyo3-ffi v0.28.3
Compiling pyo3-macros-backend v0.28.3
Compiling pyo3 v0.28.3
Compiling pyo3-macros v0.28.3
Compiling maturin-pixi v0.1.0 (/home/shh/projects/maturin-pixi)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.94s
📦 Built wheel for CPython 3.14 to /tmp/.tmpNRZ9wn/maturin_pixi-0.1.0-cp314-cp314-linux_x86_64.whl
💥 maturin failed
Caused by: uv pip install in /home/shh/projects/maturin-pixi/.pixi/envs/new-pip failed running ["pip", "install", "--no-deps", "--force-reinstall", "/tmp/.tmpNRZ9wn/maturin_pixi-0.1.0-cp314-cp314-linux_x86_64.whl"]: exit status: 2
--- Stdout:
--- Stderr:
error: Failed to inspect Python interpreter from conda prefix at `/home/shh/.local/pixi/envs/uv/bin/python3`
Caused by: Python interpreter not found at `/home/shh/.local/pixi/envs/uv/bin/python3`
---
+ pixi run -e new-uv build
✨ Pixi task (build in new-uv): maturin develop
🐍 Found CPython 3.14 at /home/shh/projects/maturin-pixi/.pixi/envs/new-uv/bin/python
🔗 Found pyo3 bindings
Compiling pyo3-build-config v0.28.3
Compiling pyo3-ffi v0.28.3
Compiling pyo3-macros-backend v0.28.3
Compiling pyo3 v0.28.3
Compiling pyo3-macros v0.28.3
Compiling maturin-pixi v0.1.0 (/home/shh/projects/maturin-pixi)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.95s
📦 Built wheel for CPython 3.14 to /tmp/.tmpP3LCh8/maturin_pixi-0.1.0-cp314-cp314-linux_x86_64.whl
✏️ Setting installed package as editable
🛠 Installed maturin-pixi-0.1.0
+ pixi run -e old-pip build
✨ Pixi task (build in old-pip): maturin develop
🔗 Found pyo3 bindings
🐍 Found CPython 3.14 at /home/shh/projects/maturin-pixi/.pixi/envs/old-pip/bin/python
Compiling pyo3-build-config v0.28.3
Compiling pyo3-macros-backend v0.28.3
Compiling pyo3-ffi v0.28.3
Compiling pyo3 v0.28.3
Compiling pyo3-macros v0.28.3
Compiling maturin-pixi v0.1.0 (/home/shh/projects/maturin-pixi)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.93s
📦 Built wheel for CPython 3.14 to /tmp/.tmpa6X0XI/maturin_pixi-0.1.0-cp314-cp314-linux_x86_64.whl
✏️ Setting installed package as editable
🛠 Installed maturin-pixi-0.1.0
+ pixi run -e old-uv build
✨ Pixi task (build in old-uv): maturin develop
🔗 Found pyo3 bindings
🐍 Found CPython 3.14 at /home/shh/projects/maturin-pixi/.pixi/envs/old-uv/bin/python
💥 maturin failed
Caused by: Failed to find pip (if working with a uv venv try `maturin develop --uv`)
Caused by: `pip --version` failed with status: exit status: 1
Your maturin version (maturin --version)
1.13.2
Your Python version (python -V)
3.14.5
Your pip version (pip -V)
26.1.1
What bindings you're using
None
Does cargo build work?
If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash /)?
Steps to Reproduce
- Have uv installed outside the pixi environment
- Run the bash script with the pixi toml file inside the folder
Bug Description
I have UV installed outside the pixi environment (in my case with
pixi global, but should be a general problem). This was likely introduced in #3165, I think their needs to be a check if the uv is installed inside the pixi environment before trying to use it over pip.Take the following
pixi.tomlfile.And run the combination
Will reduce this output:
Your maturin version (
maturin --version)1.13.2
Your Python version (
python -V)3.14.5
Your pip version (
pip -V)26.1.1
What bindings you're using
None
Does
cargo buildwork?If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash
/)?Steps to Reproduce