Python 谷歌助手“没有名为 googles 的模块......”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/44056237/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Google assistant "No module named googles...."
提问by Chandraaditya
Whenever I run this command
每当我运行此命令时
py -m googlesamples.assistant.auth_helpers -client-secrets <secrete-location>
I get an error saying:
我收到一条错误消息:
C:\Users\chand\AppData\Local\Programs\Python\Python36\python.exe:
No module named googlesamples.assistant.auth_helpers
I'm not sure what the issue is as it worked on a different device with the same steps.
我不确定问题是什么,因为它在具有相同步骤的不同设备上工作。
回答by proppy
As per version 0.3.0
of the SDK the gRPC samples are using a different auth helpers.
根据0.3.0
SDK 的版本,gRPC 示例使用不同的身份验证帮助程序。
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
From there, you should be able to follow the instructions from the SDK packageand gRPC packagepage and explore the reference sample
回答by Dean Meehan
I got this error when I didn't enter the voice shell
当我没有进入语音外壳时出现此错误
. /home/pi/bin/voice-recognizer-shell.sh
then rerun
然后重新运行
(env) pi@raspberrypi:~/voice-recognizer-raspi $ ./src/main.py
回答by Adithya
I have got the same Issue and I used these commands
我有同样的问题,我使用了这些命令
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
Be Sure to replace the path to client_Secrets file.
请务必替换 client_Secrets 文件的路径。
It worked for me. Hope this helps.
它对我有用。希望这可以帮助。