The official tutorial provides quite a concise description of installation.
What I would say is if u are on any Linux Distros, rest assured u are good to go and I believe people reading this are Linux Distros users, however to check,
- Open Terminal
- Enter
$ python
To start the python interpreter
- Enter
>> import gi
If u encounter any error, Bad Luck…If not skip the rest of the steps, you are good to go
- Exit the Python interpreter by
>> exit()
- Enter
$ pip install PyGObject
After this, recheck again and then if u still get errors, head to Google😅
You can also refer to the Installation Guide.