PyGObject + GTK3 installation
16:08 12 Feb 2026

I'm trying to install PyGObject to work with GTK3 and am running into:

ImportError: DLL load failed while importing _gi: The specified module could not be found.

I've run the following commands in my msys2 ucrt64 environment to install PyGObject:

pacman -S mingw-w64-ucrt-x86_64-python-gobject
pacman -S --needed --noconfirm base-devel mingw-w64-ucrt-x86_64-toolchain git mingw-w64-ucrt-x86_64-python-cairo mingw-w64-ucrt-x86_64-gobject-introspection mingw-w64-ucrt-x86_64-libffi

and then in cmd I ran:

pip install pygobject

I'm getting the error when I'm trying to run import gi as the first step to running the GTK3 example code. Is there a step I'm missing or somewhere I should be looking into to solve this?

python windows