Skip to content

[Bug]: ModuleNotFoundError: No module named '_ctypes' #42074

Open

Description

@uksysadmin

Bug Description

Given the installation should handle all prerequisites, this should be considered a bug:

curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash

┌─────────────────────────────────────────────────────────┐
│ ⚕ Hermes Agent Installer │
├─────────────────────────────────────────────────────────┤
│ An open source AI agent by Nous Research. │
└─────────────────────────────────────────────────────────┘

✓ Detected: linux (ubuntu)
→ Installing managed uv into /home/kevin/.hermes/bin ...
✓ Managed uv installed (uv 0.11.19 (x86_64-unknown-linux-gnu))
→ Checking Python 3.11...
✓ Python found: Python 3.11.8
→ Checking Git...
✓ Git 2.43.0 found
→ Checking Node.js (for browser tools)...
✓ Node.js v24.16.0 found
→ Checking internet connectivity for package install and web tools...
✓ Internet connectivity looks good
→ Checking ripgrep (fast file search)...
→ Checking ffmpeg (TTS voice messages)...
✓ ffmpeg 6.1.1-3ubuntu5 found

→ sudo is needed ONLY to install optional system packages (ripgrep) via your package manager.
→ Hermes Agent itself does not require or retain root access.
Install ripgrep for faster file search? [Y/n]
[sudo] password for kevin:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
ripgrep
0 upgraded, 1 newly installed, 0 to remove and 7 not upgraded.
Need to get 1,551 kB of archives.
After this operation, 5,335 kB of additional disk space will be used.
Get:1 http://gb.archive.ubuntu.com/ubuntu noble/universe amd64 ripgrep amd64 14.1.0-1 [1,551 kB]
Fetched 1,551 kB in 0s (6,480 kB/s)
Selecting previously unselected package ripgrep.
(Reading database ... 357696 files and directories currently installed.)
Preparing to unpack .../ripgrep_14.1.0-1_amd64.deb ...
Unpacking ripgrep (14.1.0-1) ...
Setting up ripgrep (14.1.0-1) ...
Processing triggers for man-db (2.12.0-4build2) ...
✓ ripgrep installed
→ Installing to /home/kevin/.hermes/hermes-agent...
→ Trying SSH clone...
✓ Cloned via SSH
✓ Repository ready
→ Creating virtual environment with Python 3.11...
Using CPython 3.11.8 interpreter at: /home/kevin/.pyenv/versions/3.11.8/bin/python3.11
Creating virtual environment at: venv
Activate with: source venv/bin/activate
✓ Virtual environment ready (Python 3.11)
→ Installing dependencies...
→ Some build tools may be needed for Python packages...
✓ Build tools installed
→ Trying tier: hash-verified (uv.lock) ...
→ (this resolves + downloads the curated [all] set — first run on a
→ fresh venv can take 1-5 minutes; uv prints progress below)
Resolved 219 packages in 0.95ms
Built hermes-agent @ file:///home/kevin/.hermes/hermes-agent
Prepared 94 packages in 1.37s
Installed 94 packages in 20ms

  • agent-client-protocol==0.9.0
  • aiohappyeyeballs==2.6.1
  • aiohttp==3.13.3
  • aiosignal==1.4.0
  • annotated-doc==0.0.4
  • annotated-types==0.7.0
  • anyio==4.12.1
  • attrs==25.4.0
  • certifi==2026.2.25
  • cffi==2.0.0
  • charset-normalizer==3.4.4
  • click==8.3.1
  • croniter==6.0.0
  • cryptography==46.0.7
  • defusedxml==0.7.1
  • distro==1.9.0
  • fastapi==0.133.1
  • fire==0.7.1
  • frozenlist==1.8.0
  • google-api-core==2.30.3
  • google-api-python-client==2.194.0
  • google-auth==2.49.2
  • google-auth-httplib2==0.3.1
  • google-auth-oauthlib==1.3.1
  • googleapis-common-protos==1.73.0
  • h11==0.16.0
  • hermes-agent==0.16.0 (from file:///home/kevin/.hermes/hermes-agent)
  • httpcore==1.0.9
  • httplib2==0.31.2
  • httptools==0.7.1
  • httpx==0.28.1
  • httpx-sse==0.4.3
  • idna==3.15
  • jinja2==3.1.6
  • jiter==0.13.0
  • jsonschema==4.26.0
  • jsonschema-specifications==2025.9.1
  • markdown==3.10.2
  • markdown-it-py==4.0.0
  • markupsafe==3.0.3
  • mcp==1.26.0
  • mdurl==0.1.2
  • multidict==6.7.1
  • oauthlib==3.3.1
  • openai==2.24.0
  • pathspec==1.1.1
  • pillow==12.2.0
  • prompt-toolkit==3.0.52
  • propcache==0.4.1
  • proto-plus==1.27.2
  • protobuf==6.33.5
  • psutil==7.2.2
  • ptyprocess==0.7.0
  • pyasn1==0.6.3
  • pyasn1-modules==0.4.2
  • pycparser==3.0
  • pydantic==2.13.4
  • pydantic-core==2.46.4
  • pydantic-settings==2.13.1
  • pygments==2.19.2
  • pyjwt==2.12.1
  • pyparsing==3.3.2
  • python-dateutil==2.9.0.post0
  • python-dotenv==1.2.2
  • python-multipart==0.0.27
  • pytz==2025.2
  • pyyaml==6.0.3
  • referencing==0.37.0
  • requests==2.33.0
  • requests-oauthlib==2.0.0
  • rich==14.3.3
  • rpds-py==0.30.0
  • ruamel-yaml==0.18.17
  • ruamel-yaml-clib==0.2.15
  • simple-term-menu==1.6.6
  • six==1.17.0
  • sniffio==1.3.1
  • socksio==1.0.0
  • sse-starlette==3.3.2
  • starlette==1.0.1
  • tenacity==9.1.4
  • termcolor==3.3.0
  • tqdm==4.67.3
  • typing-extensions==4.15.0
  • typing-inspection==0.4.2
  • uritemplate==4.2.0
  • urllib3==2.6.3
  • uvicorn==0.41.0
  • uvloop==0.22.1
  • watchfiles==1.1.1
  • wcwidth==0.6.0
  • websockets==15.0.1
  • yarl==1.22.0
  • youtube-transcript-api==1.2.4
    ✓ Main package installed (hash-verified via uv.lock)
    ✓ All dependencies installed
    → Installing Node.js dependencies (browser tools)...

⠏⠉ ⠉⢹

██╗   ██╗███╗   ██╗██╗ ██████╗ ██████╗ ██████╗ ███████╗
██║   ██║████╗  ██║██║██╔════╝██╔═══██╗██╔══██╗██╔════╝
██║   ██║██╔██╗ ██║██║██║     ██║   ██║██║  ██║█████╗
██║   ██║██║╚██╗██║██║██║     ██║   ██║██║  ██║██╔══╝
╚██████╔╝██║ ╚████║██║╚██████╗╚██████╔╝██████╔╝███████╗
 ╚═════╝ ╚═╝  ╚═══╝╚═╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝
BRAILLE ANIMATIONS

⠧⠀ braille        ⠀⠀⢸⡇ scan           ⠂⠌⡠⠐ rain
⣀⠀ orbit          ⢾⣉⡷⠀ pulse          ⠊⡰⡡⡘ sparkle
⡑⠀ breathe        ⠀⢀⡴⠋ cascade        ⠙⠢⣄⣠ waverows
⠀⠛ snake          ⣿⡇⠀⠀ columns        ⣉⡱⣉⡱ helix
⣿⣿ fillsweep      ⠓⠓⠓⠀ scanline       ⠠⠐⠈⠁ braillewave
⣿⡿ diagswipe      ⡪⡪⡪⠀ checkerboard   ⠉⠙⠚⠒ dna

npx unicode-animations                  demo all spinners
npx unicode-animations --list           list all spinners
npx unicode-animations --web              open in browser

⣇⣀ ⣀⣸

✅ Browser tools ready. Run: python run_agent.py --help
✓ Node.js dependencies installed
→ Installing browser engine (Playwright Chromium)...
✓ Found system Chrome/Chromium at /usr/bin/google-chrome
→ Skipping Playwright browser download; Hermes will use the system browser.
✓ Browser engine setup complete
→ Installing TUI dependencies...
✅ Browser tools ready. Run: python run_agent.py --help
✓ TUI dependencies installed
→ Setting up hermes command...
✓ Installed hermes launcher → ~/.local/bin/hermes
→ ~/.local/bin already on PATH
✓ hermes command ready
→ Setting up configuration files...
✓ Created ~/.hermes/.env from template
✓ Configured browser tools to use /usr/bin/google-chrome
✓ Created ~/.hermes/config.yaml from template
✓ Created ~/.hermes/SOUL.md (edit to customize personality)
✓ Configuration directory ready: ~/.hermes/
→ Syncing bundled skills to ~/.hermes/skills/ ...
Syncing bundled skills into ~/.hermes/skills/ ...

  • claude-code
  • opencode
  • codex
  • hermes-agent
  • dogfood
  • obsidian
  • jupyter-live-kernel
  • huggingface-hub
  • obliteratus
  • serving-llms-vllm
  • llama-cpp
  • segment-anything-model
  • audiocraft-audio-generation
  • weights-and-biases
  • evaluating-llms-harness
  • python-debugpy
  • simplify-code
  • requesting-code-review
  • node-inspect-debugger
  • plan
  • hermes-agent-skill-authoring
  • systematic-debugging
  • spike
  • test-driven-development
  • xurl
  • himalaya
  • yuanbao
  • openhue
  • kanban-worker
  • kanban-orchestrator
  • github-issues
  • github-repo-management
  • github-code-review
  • github-auth
  • github-pr-workflow
  • codebase-inspection
  • blogwatcher
  • research-paper-writing
  • polymarket
  • arxiv
  • llm-wiki
  • godmode
  • songsee
  • gif-search
  • heartmula
  • youtube-content
  • notion
  • teams-meeting-pipeline
  • airtable
  • powerpoint
  • maps
  • nano-pdf
  • ocr-and-documents
  • google-workspace
  • manim-video
  • p5js
  • humanizer
  • ascii-video
  • design-md
  • baoyu-infographic
  • pretext
  • comfyui
  • excalidraw
  • ascii-art
  • architecture-diagram
  • songwriting-and-ai-music
  • claude-design
  • popular-web-designs
  • sketch
  • touchdesigner-mcp
  • imessage
  • macos-computer-use
  • findmy
  • apple-reminders
  • apple-notes

Done: 75 new, 0 updated, 0 unchanged. 75 total bundled.
✓ Skills synced to ~/.hermes/skills/

→ Starting setup wizard...

Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/home/kevin/.hermes/hermes-agent/hermes_cli/main.py", line 14050, in
main()
File "/home/kevin/.hermes/hermes-agent/hermes_cli/main.py", line 13096, in main
_set_process_title()
File "/home/kevin/.hermes/hermes-agent/hermes_cli/main.py", line 92, in _set_process_title
import ctypes
File "/home/kevin/.pyenv/versions/3.11.8/lib/python3.11/ctypes/init.py", line 8, in
from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'

Steps to Reproduce

  1. On Ubuntu 24.04
  2. As a normal user: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash

Expected Behavior

Installation should complete after installing any dependencies

Actual Behavior

Stack trace complaining that

→ Starting setup wizard...

Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/home/kevin/.hermes/hermes-agent/hermes_cli/main.py", line 14050, in
main()
File "/home/kevin/.hermes/hermes-agent/hermes_cli/main.py", line 13096, in main
_set_process_title()
File "/home/kevin/.hermes/hermes-agent/hermes_cli/main.py", line 92, in _set_process_title
import ctypes
File "/home/kevin/.pyenv/versions/3.11.8/lib/python3.11/ctypes/init.py", line 8, in
from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'

Affected Component

Setup / Installation

Messaging Platform (if gateway-related)

No response

Debug Report

Unable to

Operating System

Ubuntu 24.04

Python Version

No response

Hermes Version

No response

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

No response

Are you willing to submit a PR for this?

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

Activity

  1. liuhao1024 commented on Jun 8, 2026

    @liuhao1024

    This is fixed by #42080 — adds a try/except guard around _set_process_title to handle missing _ctypes gracefully.

  2. added
    type/bugSomething isn't working
    P2Medium — degraded but workaround exists
    comp/cliCLI entry point, hermes_cli/, setup wizard
    on Jun 8, 2026
  3. GottZ commented on Jul 28, 2026

    @GottZ

    This was generated by AI during triage.

    Summary

    Three PRs address #42074 by making the cosmetic process-title fallback tolerate Python builds without _ctypes. #42210 contains only the startup guard, while #42080 and #42309 also add installer diagnostics and regression tests; #42309 provides the most complete and internally consistent implementation.

    Related pull requests

    Duplicates

    #42080, #42210, and #42309 duplicate the same core ctypes import guard; #42080 and #42309 additionally overlap on installer diagnostics and regression coverage.

    Suggested consolidation

    Merge #42309 as the consolidated fix: it covers the startup cause, installer guidance, and focused tests while using the installer’s actual log_warn helper. This differs from the keep_open review on #42080 because that review itself identifies the unresolved log_warning/set -e failure, whereas #42309's diff already fixes it; #42080 and #42210 can remain closed or be closed as duplicates of #42309.

    Complex graph

    flowchart LR
        classDef open fill:#dbeafe,stroke:#1d4ed8,color:#1e3a8a
        classDef merged fill:#dcfce7,stroke:#15803d,color:#14532d
        classDef closed fill:#e5e7eb,stroke:#6b7280,color:#1f2937
        classDef unverified fill:#f3f4f6,stroke:#9ca3af,color:#374151
        classDef best stroke-width:3px,stroke:#b45309
        classDef target stroke-width:3px,stroke:#4338ca
        I42074(["issue #42074 (open)"])
        subgraph Dup42080 ["PRs duplicating each other"]
            P42080["PR #42080 (open)"]
            P42210["PR #42210 (closed)"]
            P42309["PR #42309 (closed)"]
        end
        P42080 -.->|partial| I42074
        P42210 -->|fixes| I42074
        P42309 -->|best fix| I42074
        class I42074 open
        class I42074 target
        class P42080 open
        class P42210 closed
        class P42309 closed
        class P42309 best
        click I42074 "https://github.com/NousResearch/hermes-agent/issues/42074"
        click P42080 "https://github.com/NousResearch/hermes-agent/pull/42080"
        click P42210 "https://github.com/NousResearch/hermes-agent/pull/42210"
        click P42309 "https://github.com/NousResearch/hermes-agent/pull/42309"
    
    Loading

    Graph: solid arrow = fixes / best fix, dashed arrow = partial or unverified (see edge label); boxed group = PRs duplicating each other; amber border = best fix; indigo border = target; gray node = closed or no verify verdict yet (state tag in the node label).

    Cross-PR triage: Reviewed 3 pull requests and 1 issue in this complex. Each diff was read against this issue; Assessment working set: 11 kB of PR diffs, 14 kB of issue/PR text, 5 kB of discussion (8 comments), 7 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existscomp/cliCLI entry point, hermes_cli/, setup wizardtype/bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions