hermes - 💡(How to fix) Fix `hermes update` fails when Hermes is installed via `uv tool install`

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

→ Running: /home/user/.local/bin/uv pip install --upgrade hermes-agent error: No virtual environment found; run uv venv to create an environment, or pass --system to install into a non-virtual environment ✗ Update failed

Root Cause

In hermes_cli/main.py, function _cmd_update_pip() (line 7724):

uv = shutil.which("uv")
if uv:
    cmd = [uv, "pip", "install", "--upgrade", "hermes-agent"]

uv pip install requires a virtual environment, but uv tool install installs globally — there is no venv.

Fix Action

Fix

Detect the installation method and use the correct command:

uv = shutil.which("uv")
if uv:
    tool_check = subprocess.run(
        [uv, "tool", "list"],
        capture_output=True, text=True, timeout=15,
    )
    is_uv_tool = "hermes-agent" in tool_check.stdout
    if is_uv_tool:
        cmd = [uv, "tool", "upgrade", "hermes-agent"]
    else:
        cmd = [uv, "pip", "install", "--upgrade", "--system", "hermes-agent"]

Code Example

Running: /home/user/.local/bin/uv pip install --upgrade hermes-agent
error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Update failed

---

uv = shutil.which("uv")
if uv:
    cmd = [uv, "pip", "install", "--upgrade", "hermes-agent"]

---

uv = shutil.which("uv")
if uv:
    tool_check = subprocess.run(
        [uv, "tool", "list"],
        capture_output=True, text=True, timeout=15,
    )
    is_uv_tool = "hermes-agent" in tool_check.stdout
    if is_uv_tool:
        cmd = [uv, "tool", "upgrade", "hermes-agent"]
    else:
        cmd = [uv, "pip", "install", "--upgrade", "--system", "hermes-agent"]
RAW_BUFFERClick to expand / collapse

Bug Description

hermes update fails on systems where Hermes was installed via uv tool install hermes-agent, because _cmd_update_pip() runs uv pip install --upgrade hermes-agent which requires an active virtual environment.

Steps to Reproduce

  1. Install Hermes via uv tool install hermes-agent (standard install script)
  2. Run hermes update
  3. See error:
→ Running: /home/user/.local/bin/uv pip install --upgrade hermes-agent
error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
✗ Update failed

Root Cause

In hermes_cli/main.py, function _cmd_update_pip() (line 7724):

uv = shutil.which("uv")
if uv:
    cmd = [uv, "pip", "install", "--upgrade", "hermes-agent"]

uv pip install requires a virtual environment, but uv tool install installs globally — there is no venv.

Fix

Detect the installation method and use the correct command:

uv = shutil.which("uv")
if uv:
    tool_check = subprocess.run(
        [uv, "tool", "list"],
        capture_output=True, text=True, timeout=15,
    )
    is_uv_tool = "hermes-agent" in tool_check.stdout
    if is_uv_tool:
        cmd = [uv, "tool", "upgrade", "hermes-agent"]
    else:
        cmd = [uv, "pip", "install", "--upgrade", "--system", "hermes-agent"]

Environment

  • OS: Linux (Debian)
  • Hermes version: 0.14.0
  • Installation method: standard install script (curl ... | bash)

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix `hermes update` fails when Hermes is installed via `uv tool install`