hermes - ✅(Solved) Fix `hermes update` hangs on Python deps when `uv` installed but pip mirror is only in pip.conf [1 pull requests, 1 participants]

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…
GitHub stats
NousResearch/hermes-agent#17755Fetched 2026-05-01 05:56:06
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×3cross-referenced ×1

Error Message

  • Option B: The update should detect this and warn/fall back to pip

Root Cause

In hermes_cli/main.py:_cmd_update_impl() (line 6807-6812), the update flow checks for uv on PATH and prefers uv pip over pip:

uv_bin = shutil.which("uv")
if uv_bin:
    uv_env = {**os.environ, "VIRTUAL_ENV": str(PROJECT_ROOT / "venv")}
    _install_python_dependencies_with_optional_fallback(
        [uv_bin, "pip"], env=uv_env
    )

However, uv does NOT read ~/.pip/pip.conf. Users who have configured a PyPI mirror (e.g. Aliyun mirrors.aliyun.com for users in China) find that their mirror is silently ignored — uv hits pypi.org directly, which can be extremely slow or hang entirely depending on network conditions.

In contrast, the else branch uses sys.executable -m pip which correctly inherits the pip config and uses the configured mirror.

Fix Action

Workaround

Configure uv's own mirror at ~/.config/uv/uv.toml:

[pip]
index-url = "https://mirrors.aliyun.com/pypi/simple"

Or remove uv from PATH so Hermes falls back to pip.

PR fix notes

PR #17761: fix(cli): pass pip.conf index to uv updates

Description (problem / solution / changelog)

Summary

  • Mirror pip's configured global.index-url into UV_INDEX_URL when uv pip is used during dependency updates.
  • Keep an explicit UV_INDEX_URL untouched so users with native uv config are not overridden.
  • Add a regression test for the pip.conf mirror handoff.

Root cause

uv pip does not read ~/.pip/pip.conf, while the update path preferred uv whenever it was installed. Users relying only on pip's index-url mirror were silently sent to uv's default index instead.

Fix

Add a small env builder for uv-based updates that reads pip config files and copies global.index-url into UV_INDEX_URL before invoking uv pip.

Regression coverage

tests/hermes_cli/test_cmd_update.py::test_uv_update_env_inherits_index_url_from_pip_conf covers a user-level pip.conf mirror and verifies the generated uv environment uses it.

Testing

  • scripts/run_tests.sh tests/hermes_cli/test_cmd_update.py::test_uv_update_env_inherits_index_url_from_pip_conf -v --tb=short
  • scripts/run_tests.sh tests/hermes_cli/test_cmd_update.py -v --tb=short
  • scripts/run_tests.sh tests/hermes_cli/test_cmd_update.py tests/hermes_cli/test_update_check.py tests/hermes_cli/test_update_hangup_protection.py tests/hermes_cli/test_update_gateway_restart.py tests/hermes_cli/test_update_stale_dashboard.py -v --tb=short

Closes #17755

Changed files

  • hermes_cli/main.py (modified, +39/-1)
  • tests/hermes_cli/test_cmd_update.py (modified, +20/-1)

Code Example

uv_bin = shutil.which("uv")
if uv_bin:
    uv_env = {**os.environ, "VIRTUAL_ENV": str(PROJECT_ROOT / "venv")}
    _install_python_dependencies_with_optional_fallback(
        [uv_bin, "pip"], env=uv_env
    )

---

[global]
index-url = https://mirrors.aliyun.com/pypi/simple

---

[pip]
index-url = "https://mirrors.aliyun.com/pypi/simple"
RAW_BUFFERClick to expand / collapse

Bug Description

hermes update hangs indefinitely at "→ Updating Python dependencies..." when uv is installed on the system. The process never completes and must be killed manually.

Root Cause

In hermes_cli/main.py:_cmd_update_impl() (line 6807-6812), the update flow checks for uv on PATH and prefers uv pip over pip:

uv_bin = shutil.which("uv")
if uv_bin:
    uv_env = {**os.environ, "VIRTUAL_ENV": str(PROJECT_ROOT / "venv")}
    _install_python_dependencies_with_optional_fallback(
        [uv_bin, "pip"], env=uv_env
    )

However, uv does NOT read ~/.pip/pip.conf. Users who have configured a PyPI mirror (e.g. Aliyun mirrors.aliyun.com for users in China) find that their mirror is silently ignored — uv hits pypi.org directly, which can be extremely slow or hang entirely depending on network conditions.

In contrast, the else branch uses sys.executable -m pip which correctly inherits the pip config and uses the configured mirror.

Steps to Reproduce

  1. Install uv on a system with limited/slow PyPI connectivity (e.g. in China)
  2. Configure a PyPI mirror in ~/.pip/pip.conf:
[global]
index-url = https://mirrors.aliyun.com/pypi/simple
  1. Run hermes update
  2. Git fetch and pull succeed, but "→ Updating Python dependencies..." hangs

Expected Behavior

Either:

  • Option A: uv pip should inherit the pip mirror config, OR
  • Option B: The update should detect this and warn/fall back to pip

Workaround

Configure uv's own mirror at ~/.config/uv/uv.toml:

[pip]
index-url = "https://mirrors.aliyun.com/pypi/simple"

Or remove uv from PATH so Hermes falls back to pip.

Environment

  • Hermes Agent: v0.11.0
  • uv: 0.11.6
  • pip mirror: mirrors.aliyun.com (configured in pip.conf, not in uv.toml)

extent analysis

TL;DR

Configure uv's own mirror at ~/.config/uv/uv.toml to prevent hermes update from hanging indefinitely.

Guidance

  • To resolve the issue, configure uv's mirror by adding the following to ~/.config/uv/uv.toml:
[pip]
index-url = "https://mirrors.aliyun.com/pypi/simple"
  • Alternatively, remove uv from PATH to force Hermes to fall back to pip, which correctly inherits the pip config and uses the configured mirror.
  • Verify the fix by running hermes update after applying the workaround and checking if the update completes successfully.
  • If the issue persists, ensure that the uv version is compatible with the Hermes Agent version (v0.11.0) and the configured pip mirror.

Example

No additional code snippet is required, as the workaround is a configuration change.

Notes

This solution assumes that the issue is caused by uv not reading the ~/.pip/pip.conf file and ignoring the configured PyPI mirror. The workaround configures uv's own mirror, which should allow the update to complete successfully.

Recommendation

Apply the workaround by configuring uv's mirror, as this is a more targeted solution that addresses the root cause of the issue.

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 - ✅(Solved) Fix `hermes update` hangs on Python deps when `uv` installed but pip mirror is only in pip.conf [1 pull requests, 1 participants]