繁体   English   中英

无法将 google-assistant-sdk [samples] 安装到树莓派零 W

[英]Failed to install google-assistant-sdk[samples] to raspberry pi Zero W

我正在尝试将 Google Assistant 安装到树莓派零 W。

在最后一步中,它未能完成安装 google-assistant-sdk [samples]。

我在 pi Zero 上运行 python 3.9.2。 Python 3 也被加载。

根据 Google Assistant SDK 设置说明,我已将以下内容加载到我的 Pi Zero 中,作为运行助手的设置的一部分。

sudo apt-get update
sudo apt-get install python3-dev python3-venv
python3 -m venv env
env/bin/python -m pip install --upgrade pip setuptools wheel

然后我激活了虚拟环境

source env/bin/activate

在我加载的虚拟环境中

sudo apt-get install portaudio19-dev libffi-dev libssl-dev

最后一步需要加载谷歌助手 SDK,这就是它出错的地方。

python -m pip install --upgrade google-assistant-sdk[samples]

最初设置似乎进展顺利,然后在下载 grpcio-1.47.0.tar.gz 后准备元数据时,子进程退出并出现错误。

Collecting grpcio>=1.3.5
  Downloading grpcio-1.47.0.tar.gz (21.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 21.9/21.9 MB 627.2 kB/s eta 0:00:00
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [14 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-07egyhge/grpcio_4430b3443c8b44d5b7610d4106a35227/setup.py", line 263, in <module>
          if check_linker_need_libatomic():
        File "/tmp/pip-install-07egyhge/grpcio_4430b3443c8b44d5b7610d4106a35227/setup.py", line 219, in check_linker_need_libatomic
          cpp_test = subprocess.Popen(
        File "/usr/lib/python3.9/subprocess.py", line 951, in __init__
          self._execute_child(args, executable, preexec_fn, close_fds,
        File "/usr/lib/python3.9/subprocess.py", line 1698, in _execute_child
          and os.path.dirname(executable)
        File "/usr/lib/python3.9/posixpath.py", line 152, in dirname
          p = os.fspath(p)
      TypeError: expected str, bytes or os.PathLike object, not list
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

我已经重新运行了几次,仍然在虚拟环境中,指定 python3 或 python3.9

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

python3.9 -m pip install --upgrade google-assistant-sdk[samples]

我每次都得到同样的错误。

在这一点上,我不确定我能做些什么不同的事情。

我正在寻找有关后续步骤的一些指导。

谢谢 manderson96

虽然它与您上面的问题没有直接关系,但最后的这篇文章为我修复了它。 1.46/47 版本存在问题,您需要做一些变通方法来安装。 使用步骤 1 和 2,进一步的步骤不适用。

https://github.com/home-assistant/core/issues/65837#issuecomment-1173134862

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM