在Python3.6 OSX上安装Google Assistant [英] Google Assistant Installation on Python3.6 OSX

查看:149
本文介绍了在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页面上查看该软件包的更新文档.

这篇关于在Python3.6 OSX上安装Google Assistant的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆