Google Assistant Installation on Python3.6 OSX

[亡魂溺海] 提交于 2019-12-25 16:55:40

问题


I am trying to install Google Assistant on OSX with Python 3.6.

I successfully ran this command:

python3 -m pip install "google-assistant-sdk[samples]" 

But when I run this command with the path to the JSON file from the Google Cloud Platform:

python3 -m googlesamples.assistant.auth_helpers --client-secrets /path-to/secret.json

I get this error:

/usr/local/opt/python3/bin/python3.6: No module named googlesamples.assistant.auth_helpers

Also here's the python3.6/site-packages folder: Terminal Screenshot

Seems that everything is installed but still it doesn't find the module. Anybody can tell why and how to solve it?

Many thanks in advance!


回答1:


The new version of the package use a different tool for negotiating the credentials.

python -m pip install --upgrade google-auth-oauthlib[tool]
google-oauthlib-tool --client-secrets /home/pi/client_secret_client-id.json --scope https://www.googleapis.com/auth/assistant-sdk-prototype --save --headless

See the updated documentation for the package on the PyPi page.



来源:https://stackoverflow.com/questions/44070598/google-assistant-installation-on-python3-6-osx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!