i have try all the possible command given below:
pip install pgi , pip install PyGObject , pip install python-gi
Still not able to install the module in python . Installed python 3.7 also try to make a virtual environment but not able to install the module .
#import cv2 import gi import numpy as np gi.require_version('Gst', '1.0') from gi.repository import Gst 53 Answers
Try this:
sudo apt install libcairo2-dev libxt-dev libgirepository1.0-dev pip install pycairo PyGObject 3In an Arch based distro, this worked for me. You can use another AUR helper such as Pamac or Yay instead of Paru.
paru -S gobject-introspection pip install pygobject I got my python setup properly trashed on Ubuntu 20.04. I was trying to use apt-add-repository and got "ModuleNotFoundError: No module named 'gi'". I had already installed software-properties-common and python3-gi using apt. For me the answer was
sudo apt-get --reinstall install python3-gi