What I tried:
brew install pygobject3 --with-python@2 gtk+3
brew install pygtk3
brew install pygobject3
pip install pygobject
python -c \'import gi; gi.requ
I had the same problem. I followed the instructions on pygobject web.
Everything is fine now (note I use python3 not python for the test) :
$ python3 -c 'import gi; gi.require_version("Gtk", "3.0"); print("ok")'
ok