在Python3.6 OSX上安装Google Assistant

问题描述:

我正在尝试使用Python 3.6在OSX上安装Google Assistant.

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

我成功运行了此命令:

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

但是当我运行此命令以及Google Cloud Platform上JSON文件的路径时:

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

我收到此错误:

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

这也是python3.6/site-packages文件夹: 终端屏幕截图

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?

非常感谢!

该软件包的新版本使用其他工具来协商凭据.

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

PyPi页面上查看该软件包的更新文档.