安装Google Assistant时出现错误"... googlesamples.assistant'是一个程序包,无法直接执行..." [英] When installing Google Assistant, I an error "...googlesamples.assistant' is a package and cannot be directly executed..."
问题描述
好的,已经在我的Windows 10 PC上安装了Google助手,并遇到了多个错误,最后一个错误是通过以下方法解决的:
Alright, have been installing Google Assistant on my Windows 10 PC and have been met with multiple errors, the last of which I solved by going here: Google Assistant Installation on Python3.6 OSX
现在,我已经安装了所有东西,并且想要测试我的麦克风,然后开始使用助手.但是,当我输入命令
Now, I have everything installed, and want to test my mic and then start using the assistant. However, when I put in the commands
python -m googlesamples.assistant.audio_helpers
和
python -m googlesamples.assistant
我收到此错误:
C:\Users\robmak3>python -m googlesamples.assistant
C:\Users\robmak3\AppData\Local\Programs\Python\Python36\python.exe: No
module named googlesamples.assistant.__main__; 'googlesamples.assistant' is
a package and cannot be directly executed
我一直在尝试遵循此指南: https://www.xda-developers.com/how-to-get-google-assistant-on-your-windows-mac-or-linux-machine/
I've been trying to follow this guide: https://www.xda-developers.com/how-to-get-google-assistant-on-your-windows-mac-or-linux-machine/
任何帮助解决此问题的方法都将非常有用!谢谢!
Any help fixing this would be great! Thanks!
推荐答案
根据SDK的0.3.0
版本,gRPC示例正在使用其他身份验证帮助程序.
As per version 0.3.0
of the SDK the gRPC samples are using a different auth helpers.
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
您可以使用以下命令启动更新gRPC示例:
And you can launch the update gRPC sample with:
python -m googlesamples.assistant.grpc.pushtotalk
您应该能够按照 SDK软件包中的说明进行操作,并 gRPC软件包页并浏览参考
You should be able to follow the instructions from the SDK package and gRPC package page and explore the reference sample
这篇关于安装Google Assistant时出现错误"... googlesamples.assistant'是一个程序包,无法直接执行..."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!