docs(wechat): use agent-reach interpreter for miku_ai search example#188
Merged
Panniantong merged 1 commit intomainfrom Mar 23, 2026
Merged
docs(wechat): use agent-reach interpreter for miku_ai search example#188Panniantong merged 1 commit intomainfrom
Panniantong merged 1 commit intomainfrom
Conversation
miku_ai is installed inside the agent-reach Python environment (pipx venv or user venv). Using bare 'python3' fails when agent-reach was installed via pipx, because system python3 cannot import miku_ai. Fix: detect the correct interpreter at runtime via: $(python3 -c "import agent_reach, sys; print(sys.executable)") This resolves the interpreter transparently for pipx, venv, and plain pip installs without hardcoding paths. Closes #187
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Fixes #187
miku_aiis installed inside the agent-reach Python environment (viapipx injectorpip installinto the same venv). When users install agent-reach via pipx (the recommended method indocs/install.md), the systempython3is a different interpreter — it cannot importmiku_ai, causingModuleNotFoundError.The SKILL.md search example used bare
python3 -c ..., which silently breaks for pipx users.Fix
Detect the correct interpreter at runtime:
AGENT_REACH_PYTHON=$(python3 -c "import agent_reach, sys; print(sys.executable)" 2>/dev/null || echo python3)This resolves correctly for all install methods:
~/.local/share/pipx/venvs/agent-reach/bin/pythonpython3(same as before)No hardcoded paths; no new dependencies.
Verification
python3 -m pytest tests/ -x -q→ 49 passed