Prefer /usr/bin/python3 over PATH uv-managed interpreters

setup_linux.sh used command -v python3, which with an activated .venv or
uv on PATH resolved to ~/.local/share/uv/python/... and failed the gi
preflight even though apt python3-gi was installed. Always use
/usr/bin/python3 for the native-window venv.

Co-authored-by: Diaco Soltanpour <s-diaco@users.noreply.github.com>
This commit is contained in:
Cursor Agent
2026-07-25 06:03:16 +00:00
parent c38d9a93be
commit 3463fb74df
4 changed files with 41 additions and 16 deletions

View File

@@ -39,8 +39,9 @@ def _linux_native_hint(detail: str | None = None) -> str:
if "_gi" in detail_l or "partially initialized" in detail_l:
lines.append(
"This usually means the venv Python does not match apt "
"python3-gi (uv picked a managed CPython). Re-run "
"./desktop/setup_linux.sh so .venv uses /usr/bin/python3."
"python3-gi (uv-managed CPython on PATH, e.g. "
"~/.local/share/uv/python/...). Re-run ./desktop/setup_linux.sh "
"so .venv uses /usr/bin/python3 (not PATH python3)."
)
lines.append(
"Falling back to the default browser. "