Skip to content

uv run ga tui2 uses system Python instead of .venv Python #602

@dougen

Description

@dougen

Problem

When running uv run ga tui2 (or any frontend command like gui, cli, hub, tui), the subprocess launches using "python" which resolves to the system Python on PATH, not the .venv Python.

Root Cause

In ga_cli/cli.py, the COMMANDS dict uses "python" as the executable:

"tui2": {
    "cmd": ["python", "{FRONTENDS}/tuiapp_v2.py"],
},

The launch_frontend() function passes this directly to subprocess.Popen without resolving to the current Python (sys.executable).

Fix

Added a check in launch_frontend() to replace "python" with sys.executable:

# Use .venv Python instead of system PATH python
if full_cmd and full_cmd[0] == "python":
    full_cmd[0] = sys.executable

This way all commands (tui2, gui, cli, hub, etc.) will use the same Python that uv run is using (which is the .venv Python).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions