问题
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