fix: uv pip install fails outside venv in setup wizard

uv pip install requires a virtual environment by default. When hermes
is installed system-wide or via pipx, the setup wizard's SDK installs
(daytona, swe-rex[modal], tinker-atropos) fail with 'No virtual
environment found'. Fix by passing --python sys.executable to uv,
which targets the correct Python regardless of venv state.

Also show the actual error message on install failure so users can
debug.
fix/verification-admin-route-recovery
teknium1 2026-03-06 21:55:33 -08:00
parent 99bd69baa8
commit 9dac85b069
2 changed files with 5 additions and 3 deletions

View File

@ -1080,7 +1080,7 @@ def setup_terminal_backend(config: dict):
uv_bin = shutil.which("uv")
if uv_bin:
result = subprocess.run(
[uv_bin, "pip", "install", "swe-rex[modal]"],
[uv_bin, "pip", "install", "--python", sys.executable, "swe-rex[modal]"],
capture_output=True, text=True
)
else:
@ -1132,7 +1132,7 @@ def setup_terminal_backend(config: dict):
uv_bin = shutil.which("uv")
if uv_bin:
result = subprocess.run(
[uv_bin, "pip", "install", "daytona"],
[uv_bin, "pip", "install", "--python", sys.executable, "daytona"],
capture_output=True, text=True
)
else:
@ -1144,6 +1144,8 @@ def setup_terminal_backend(config: dict):
print_success("daytona SDK installed")
else:
print_warning("Install failed — run manually: pip install daytona")
if result.stderr:
print_info(f" Error: {result.stderr.strip().splitlines()[-1]}")
# Daytona API key
print()

View File

@ -260,7 +260,7 @@ def _run_post_setup(post_setup_key: str):
uv_bin = shutil.which("uv")
if uv_bin:
result = subprocess.run(
[uv_bin, "pip", "install", "-e", str(tinker_dir)],
[uv_bin, "pip", "install", "--python", sys.executable, "-e", str(tinker_dir)],
capture_output=True, text=True
)
else: