"from gi.repository import Gtk" fails
I'm trying to convert my Python GTK projects to Python 3 and PyGObject (on Mac OS Catalina). Following https://pygobject.readthedocs.io/en/latest/getting_started.html, I've installed pygobject3 and gtk+3 using brew.
When I run python3, "import gi" succeeds but "from gi.repository import Gtk" fails:
Python 3.8.5 (v3.8.5:580fbb018f, Jul 20 2020, 12:11:27) [ Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import gi >>> from gi.repository import Gtk ** (process:66762): WARNING **: 08:02:00.158: Failed to load shared library 'libpango- 1.0.0.dylib' referenced by the typelib: dlopen(libpango-1.0.0.dylib, 9): image not found
I did get that library installed in my /usr/local/lib (symlinked to the "brew" Cellar, and the link is good), but gi apparently isn't finding it. I tried adding /usr/local/lib to my PYTHONPATH, but that doesn't help.
"brew" tells me that my pyobject3, gtk+3 and pango are all up to date.
Is there something I should do that isn't in the installation instructions?