Google助手"没有名为googles的模块...."

时间:2017-05-18 19:23:15

标签: python windows google-assistant-sdk

每当我运行此命令

py -m googlesamples.assistant.auth_helpers -client-secrets <secrete-location> 

我收到错误说:

C:\Users\chand\AppData\Local\Programs\Python\Python36\python.exe:
  No module named googlesamples.assistant.auth_helpers

我不确定问题是什么,因为它在具有相同步骤的其他设备上工作。

3 个答案:

答案 0 :(得分:12)

根据SDK的0.3.0版本,gRPC示例使用不同的auth帮助程序。

pip install --upgrade google-auth-oauthlib[tool]
google-oauthlib-tool --client-secrets path/to/client_secret_XXXXX.json --scope https://www.googleapis.com/auth/assistant-sdk-prototype --save --headless

从那里,您应该可以按照SDK packagegRPC package页面上的说明操作,并浏览参考sample

答案 1 :(得分:2)

当我没有进入语音外壳时出现此错误

. /home/pi/bin/voice-recognizer-shell.sh
然后重新运行

(env) pi@raspberrypi:~/voice-recognizer-raspi $ ./src/main.py

答案 2 :(得分:2)

我遇到了同样的问题,并且使用了以下命令

python3 -m pip install --upgrade google-auth-oauthlib[tool]

google-oauthlib-tool --scope https://www.googleapis.com/auth/assistant-sdk- prototype \
  --scope https://www.googleapis.com/auth/gcm \
  --save --headless --client-secrets /path/to/client_secret_client-id.json

请务必替换client_Secrets文件的路径。

对我有用。希望这可以帮助。