hermes - ✅(Solved) Fix [Bug]: google-workspace skill unusable on Nix — Google API deps missing and pip unavailable [1 pull requests, 3 comments, 2 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#13626Fetched 2026-04-22 08:05:12
View on GitHub
Comments
3
Participants
2
Timeline
8
Reactions
0
Timeline (top)
commented ×3labeled ×3cross-referenced ×2

Error Message

/nix/store/.../python3.12: No module named pip Installing Google API dependencies... ERROR: Failed to install dependencies: Command '...python3.12 -m pip install --quiet google-api-python-client google-auth-oauthlib google-auth-httplib2' returned non-zero exit status 1.

Root Cause

google-api-python-client, google-auth-oauthlib, and google-auth-httplib2 are not declared in pyproject.toml — not even as an optional extra. The skill relies on runtime pip install via setup.py --install-deps, which assumes pip is available. The Nix Python environment strips pip and ensurepip.

Current hermes-agent extras include messaging, voice, tts-premium, modal, honcho, etc. — but nothing for Google Workspace.

Confirmed by checking package metadata:

from importlib.metadata import metadata
[d for d in metadata("hermes-agent").get_all("Requires-Dist") if "google" in d.lower()]
# []  — zero Google deps declared

Fix Action

Fixed

PR fix notes

PR #12729: fix(skills): google-workspace setup.py fallback when hermes_constants unavailable

Description (problem / solution / changelog)

Problem

The three google-workspace skill scripts each resolve HERMES_HOME differently:

ScriptPatternIssue
setup.pyfrom hermes_constants import ...Crashes outside Hermes process (ModuleNotFoundError)
google_api.pyPath(os.getenv("HERMES_HOME", ...))No .strip(), no empty-string handling
gws_bridge.pyOwn local get_hermes_home()Duplicated function, same missing edge cases

hermes_constants is described as "import-safe with no dependencies" but it lives inside the Hermes Python package — unreachable from system Python, nix envs without PYTHONPATH, or CI runners.

Fix

Extract the shared logic into a single _hermes_home.py helper that lives alongside the scripts:

scripts/
├── _hermes_home.py   ← NEW: shared HERMES_HOME resolution
├── setup.py          ← imports from _hermes_home
├── google_api.py     ← imports from _hermes_home
└── gws_bridge.py     ← imports from _hermes_home

_hermes_home.py delegates to hermes_constants when available (preserving profile support, Docker detection, etc.) and falls back to os.getenv("HERMES_HOME") with .strip() + empty-as-unset handling — matching the exact semantics of hermes_constants.get_hermes_home().

Each consumer script adds its own directory to sys.path (standard pattern for standalone scripts) and imports get_hermes_home / display_hermes_home from the helper.

What changed

  • New: scripts/_hermes_home.py — try hermes_constants, fallback to env var
  • Changed: setup.py — replaced broken parents[4] import with _hermes_home import
  • Changed: google_api.py — replaced inline os.getenv with _hermes_home import
  • Changed: gws_bridge.py — removed local get_hermes_home(), imports from _hermes_home
  • Tests: 7 new tests for the fallback path (env var, default, empty, display shortening, profile paths, custom paths)

Testing

  • pytest tests/skills/test_google_oauth_setup.py tests/skills/test_google_workspace_api.py20/20 passed
  • Manual: verified setup.py --check works with system Python (no hermes_constants)
  • Manual: verified google_api.py gmail search works unchanged

Closes #12722

Changed files

  • skills/productivity/google-workspace/scripts/_hermes_home.py (added, +42/-0)
  • skills/productivity/google-workspace/scripts/google_api.py (modified, +8/-1)
  • skills/productivity/google-workspace/scripts/gws_bridge.py (modified, +5/-2)
  • skills/productivity/google-workspace/scripts/setup.py (modified, +6/-7)
  • tests/skills/test_google_oauth_setup.py (modified, +66/-0)

Code Example

$HERMES_PYTHON ~/.hermes/skills/productivity/google-workspace/scripts/setup.py --check

---

/nix/store/.../python3.12: No module named pip
Installing Google API dependencies...
ERROR: Failed to install dependencies: Command '...python3.12 -m pip install --quiet
  google-api-python-client google-auth-oauthlib google-auth-httplib2'
  returned non-zero exit status 1.

---

Report       https://paste.rs/atHwE
agent.log    https://paste.rs/PGoGc
gateway.log  https://paste.rs/z9xT0

---

from importlib.metadata import metadata
[d for d in metadata("hermes-agent").get_all("Requires-Dist") if "google" in d.lower()]
# []  — zero Google deps declared

---

[project.optional-dependencies]
google = [
    "google-api-python-client>=2.100",
    "google-auth-oauthlib>=1.0",
    "google-auth-httplib2>=0.2",
]
RAW_BUFFERClick to expand / collapse

Bug Description

The google-workspace skill cannot function on Nix-managed Hermes installations. Google API dependencies are not bundled, and the skill cannot self-install them because the Nix Python environment has no pip.

When setup.py --check runs, it detects the missing googleapiclient import, calls install_deps(), which shells out to python -m pip install ... — and fails immediately with No module named pip.

Note: this issue is the second half of #12722. The first half (hermes_constants import crash) is addressed by PR #12729 (not yet merged).

Steps to Reproduce

$HERMES_PYTHON ~/.hermes/skills/productivity/google-workspace/scripts/setup.py --check

Expected Behavior

setup.py --check should succeed (exit 0) when a valid OAuth token exists, without requiring pip at runtime.

Actual Behavior

/nix/store/.../python3.12: No module named pip
Installing Google API dependencies...
ERROR: Failed to install dependencies: Command '...python3.12 -m pip install --quiet
  google-api-python-client google-auth-oauthlib google-auth-httplib2'
  returned non-zero exit status 1.

Affected Component

  • Skills
  • Setup / Installation

Messaging Platform

N/A (CLI only)

Debug Report

Report       https://paste.rs/atHwE
agent.log    https://paste.rs/PGoGc
gateway.log  https://paste.rs/z9xT0

Operating System

macOS 26.4.1 (Nix-managed Hermes)

Python Version

3.12.13

Hermes Version

0.10.0

Root Cause Analysis

google-api-python-client, google-auth-oauthlib, and google-auth-httplib2 are not declared in pyproject.toml — not even as an optional extra. The skill relies on runtime pip install via setup.py --install-deps, which assumes pip is available. The Nix Python environment strips pip and ensurepip.

Current hermes-agent extras include messaging, voice, tts-premium, modal, honcho, etc. — but nothing for Google Workspace.

Confirmed by checking package metadata:

from importlib.metadata import metadata
[d for d in metadata("hermes-agent").get_all("Requires-Dist") if "google" in d.lower()]
# []  — zero Google deps declared

Proposed Fix

Add a google (or google-workspace) optional extra in pyproject.toml:

[project.optional-dependencies]
google = [
    "google-api-python-client>=2.100",
    "google-auth-oauthlib>=1.0",
    "google-auth-httplib2>=0.2",
]

Then include it in the Nix flake alongside the other extras. This aligns with the existing pattern (messaging, voice, modal, etc.) and removes the need for runtime pip install.

Ref: #12722, PR #12729

  • I'd like to fix this myself and submit a PR

extent analysis

TL;DR

Add a google optional extra in pyproject.toml to declare Google API dependencies and include it in the Nix flake.

Guidance

  • Verify that the google-api-python-client, google-auth-oauthlib, and google-auth-httplib2 dependencies are not already included in the hermes-agent package metadata using the provided Python code snippet.
  • Add a google optional extra in pyproject.toml with the required dependencies, as shown in the proposed fix.
  • Update the Nix flake to include the new google extra alongside the existing extras.
  • Test the setup.py --check command to ensure it succeeds without requiring pip at runtime.

Example

[project.optional-dependencies]
google = [
    "google-api-python-client>=2.100",
    "google-auth-oauthlib>=1.0",
    "google-auth-httplib2>=0.2",
]

Notes

This fix assumes that the hermes-agent package follows the existing pattern of declaring optional dependencies in pyproject.toml. If this is not the case, additional modifications may be required.

Recommendation

Apply the proposed workaround by adding the google optional extra in pyproject.toml and updating the Nix flake, as this aligns with the existing pattern and removes the need for runtime pip install.

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 [Bug]: google-workspace skill unusable on Nix — Google API deps missing and pip unavailable [1 pull requests, 3 comments, 2 participants]