'No module named gi

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


Solution 1:[1]

Try this:

sudo apt install libcairo2-dev

sudo apt install libxt-dev

sudo apt install libgirepository1.0-dev

pip install pycairo

pip install PyGObject

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1