fix: point optional-dep install hints at the venv's python (#11938)

Error messages that tell users to install optional extras now use
{sys.executable} -m pip install ... instead of a bare 'pip install
hermes-agent[extra]' string.  Under the curl installer, bare 'pip'
resolves to system pip, which either fails with PEP 668
externally-managed-environment or installs into the wrong Python.

Affects: hermes dashboard, hermes web server startup, mcp_serve,
hermes doctor Bedrock check, CLI voice mode, voice_mode tool runtime
error, Discord voice-channel join failure message.
This commit is contained in:
Teknium 2026-04-17 21:16:33 -07:00 committed by GitHub
parent 20f2258f34
commit c5c0bb9a73
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 11 additions and 14 deletions

View file

@ -433,7 +433,7 @@ def create_mcp_server(event_bridge: Optional[EventBridge] = None) -> "FastMCP":
if not _MCP_SERVER_AVAILABLE:
raise ImportError(
"MCP server requires the 'mcp' package. "
"Install with: pip install 'hermes-agent[mcp]'"
f"Install with: {sys.executable} -m pip install 'mcp'"
)
mcp = FastMCP(
@ -838,7 +838,7 @@ def run_mcp_server(verbose: bool = False) -> None:
if not _MCP_SERVER_AVAILABLE:
print(
"Error: MCP server requires the 'mcp' package.\n"
"Install with: pip install 'hermes-agent[mcp]'",
f"Install with: {sys.executable} -m pip install 'mcp'",
file=sys.stderr,
)
sys.exit(1)