无法安装Google-Assistant-SDK [samples] raspberry pi Zero w

发布于 2025-02-11 14:54:24 字数 2663 浏览 2 评论 0 原文

我试图将Google Assistant安装到Raspberry Pi Zero W.

中。在最后一步中,它无法完成安装Google-Assistant-SDK [samples]。

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

根据Google Assistant SDK设置指令,我将以下内容加载到我的PI零作为运行助手的设置的一部分。

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

激活了虚拟env

source env/bin/activate

然后,我在虚拟设备中

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

,我加载了最后一步,需要加载Google Assistant 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

I am attempting to install the Google Assistant to a raspberry pi Zero W.

During the last step it to failed to complete install google-assistant-sdk[samples].

I am running python 3.9.2 on the pi Zero. Python 3 is also loaded.

I have loaded the following to my Pi Zero as part of the setup for running the assistant, per the Google Assistant SDK setup instructions.

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

Then I activated the virtual env

source env/bin/activate

In the virtual env I loaded

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

The final step requires loading the Google assistant SDK, this is where it goes wrong.

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

Initially the setup seems to be going well, then while preparing the metadata after downloading grpcio-1.47.0.tar.gz the subprocess exits with an error.

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.

I have rerun this several times, still in the virtual env, specifying either python3 or python3.9

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

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

I get the same error everytime.

At this point I am not sure what I can do differently.

I am looking for some guidance on next steps.

Thanks
manderson96

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦初启 2025-02-18 14:54:24

尽管它与您上面的问题没有直接相关,但最后一篇文章将其修复了。 1.46/47构建中存在一个问题,您需要进行一些解决方法以安装。使用步骤1和2,其他步骤不适用。

Whilst it's not directly related to your issue above, this post at the end fixed it for me. There is an issue in the 1.46/47 builds, and you need to do some workarounds to install. Use Step 1 and 2, the further steps are not applicable.

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文