mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-29 06:31:32 +00:00
Merge a844ff0ddc into 14b27bb68c
This commit is contained in:
commit
f4d3067e36
2 changed files with 163 additions and 0 deletions
|
|
@ -1437,6 +1437,17 @@ def get_python_path() -> str:
|
|||
venv_python = venv / "bin" / "python"
|
||||
if venv_python.exists():
|
||||
return str(venv_python)
|
||||
|
||||
# Fallback: use PROJECT_ROOT/venv/bin/python (same logic as generate_systemd_unit)
|
||||
# This is more reliable than sys.executable when running under uv.
|
||||
fallback_venv = PROJECT_ROOT / "venv"
|
||||
if is_windows():
|
||||
fallback_python = fallback_venv / "Scripts" / "python.exe"
|
||||
else:
|
||||
fallback_python = fallback_venv / "bin" / "python"
|
||||
if fallback_python.exists():
|
||||
return str(fallback_python)
|
||||
|
||||
return sys.executable
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue