For Debian/Ubuntu-based Linux distributions, you can install it via the terminal with:
bash
sudo apt-get install python3-gi
bash
pip install PyGObject
$ python3 frames_into_pytorch.py Traceback (most recent call last): File "frames_into_pytorch.py", line 3, in <module> gi.require_version('Gst', '1.0') File "/home/pxg/miniconda3/envs/vet/lib/python3.8/site-packages/gi/__init__.py", line 122, in require_version raise ValueError('Namespace %s not available' % namespace) ValueError: Namespace Gst not available
sudo apt-get update
sudo apt-get install libgirepository1.0-dev gcc libcairo2-dev pkg-config python3-dev gir1.2-gtk-3.0
pip3 install PyGObject
sudo apt-get install python3-gi
sudo apt-get install libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio gir1.2-gstreamer-1.0
export GI_TYPELIB_PATH=/usr/lib/x86_64-linux-gnu/girepository-1.0
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
标签:named,get,apt,python3,install,ModuleNotFoundError,gstreamer1.0,gi
From: https://www.cnblogs.com/shenben/p/18257744