You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

树莓派3安装Google Assistant时遇“google-oauthlib-tool: command not found”报错

Fixing Google Assistant Installation Issues on Raspberry Pi 3 (Raspbian)

Hey there, let's work through these problems step by step—no stress, even with rusty coding skills we'll get this sorted out!

First: Fix the google-oauthlib-tool: command not found error

This usually happens because the tool isn't in your system's executable path, or it got installed to the wrong Python environment. Try these options:

Option 1: Call the tool via Python module (bypasses path issues)

Instead of running google-oauthlib-tool directly, use Python's module runner to launch it—this avoids path problems entirely. Run this command (replace the path to your client secret file with the actual one):

python3 -m google.oauth2.tools.run_flow --client-secrets /path/to/your/client_secret.json --scope https://www.googleapis.com/auth/assistant-sdk-prototype --save --headless

Option 2: Reinstall the dependency to the correct Python 3 environment

It's possible the tool was installed to Python 2 instead of 3. Reinstall it explicitly for Python 3 with:

sudo pip3 install google-auth-oauthlib[tool]

After this, try running google-oauthlib-tool again, or stick with the Python module method above if that's easier.

Next: Fix the original No module named googlesamples.assistant.auth_helpers error

This module is part of the Google Assistant SDK's sample helper package. You just need to install the full SDK with sample dependencies. Run this:

sudo pip3 install google-assistant-sdk[samples]

Once this finishes, your original authentication script should be able to find that missing module.

How to check your Google Assistant SDK version

No problem—checking the version is straightforward. Run this in the terminal:

pip3 show google-assistant-sdk

Look for the Version line in the output—that's your installed SDK version.

Quick Raspberry Pi-specific tip

Since Raspbian often has both Python 2 and 3 installed, always use pip3 and python3 (not pip/python) to make sure packages go to the right environment. If you run into permission issues, try installing without sudo using the --user flag:

pip3 install --user google-assistant-sdk[samples] google-auth-oauthlib[tool]

If you do this, the google-oauthlib-tool will be in ~/.local/bin—you can either run it directly with that full path, or add ~/.local/bin to your system's PATH variable for easier access.

内容的提问来源于stack exchange,提问作者rob

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 08:17:48