在macOS Sonoma安装gst-python后无法导入Gst命名空间求助
GStreamer gst-python安装后无法导入Gst命名空间问题
环境与操作步骤
- macOS Sonoma系统,通过官方二进制包安装GStreamer 1.22.10(该版本未自动包含gst-python)
- 使用Homebrew安装Python 3.12及pygobject3,pygobject3路径为
/opt/homebrew/Cellar/pygobject3/3.46.0_1 - 克隆GStreamer仓库后,参照gst-python子项目说明进行编译安装,meson配置命令为:
meson setup builddir -Dpygi-overrides-dir=/opt/homebrew/lib/python3.12/site-packages/gi/overrides
出现的问题
执行以下测试命令时触发错误:
python -c "import gi; gi.require_version('Gst', '1.0');"
错误堆栈信息:
Traceback (most recent call last): File "<string>", line 1, in <module> File "/opt/homebrew/lib/python3.12/site-packages/gi/__init__.py", line 126, in require_version raise ValueError('Namespace %s not available' % namespace) ValueError: Namespace Gst not available
补充说明
通过Homebrew安装GStreamer会自带gst-python,但该版本缺少我需要的webrtc等组件,因此不考虑此安装方式,恳请解决当前手动安装gst-python后的导入问题。
内容的提问来源于stack exchange,提问作者chronosynclastic
相关产品推荐
相关产品推荐

