1

我已尝试按照此演练 https://developers.google.com/assistant/sdk/prototype/getting-started-pi-python/run-sample在我的 Raspberry pi 模型 b3 上构建 Google Assistant

一切都很顺利,直到我尝试开始

google-assistant-demo

我得到以下堆栈跟踪

    Traceback (most recent call last):
  File "/home/pi/env/bin/google-assistant-demo", line 11, in <module>
    sys.exit(main())
  File "/home/pi/env/local/lib/python2.7/site-packages/google/assistant/__main__.py", line 66, in main
    with Assistant(credentials) as assistant:
  File "/home/pi/env/local/lib/python2.7/site-packages/google/assistant/library/assistant.py", line 86, in __init__
    self._event_queue = IterableEventQueue()
  File "/home/pi/env/local/lib/python2.7/site-packages/google/assistant/library/event.py", line 172, in __init__
    super(IterableEventQueue, self).__init__(maxsize=32)
TypeError: must be type, not classobj

我什至不知道从哪里开始,也没有尝试过任何解决方案。什么可能导致异常?

4

1 回答 1

1

正如官方文档中所指出的:Google Assistant 库当前需要Python > 3.4

您可以使用以下命令配置虚拟环境:

python3 -m venv env
env/bin/python -m pip install --upgrade pip setuptools
source env/bin/activate
于 2017-05-19T04:48:31.387 回答