0
votes

Using instructions from this website https://www.gtk.org/download/windows.php I executed the following two lines from a Windows 10 MSYS2 window: pacman -S mingw-w64-x86_64-gtk3 pacman -S mingw-w64-x86_64-python3-gobject

No errors were reported so I assume everything went according to plan.

However the first line of the following script import gi gi.require_version ('Gtk', '3.0') from gi.repository import Gtk

Resulted in: ... line 16 in import 'gi' ModuleNotFoundError: No module named 'gi'

How do I get GTK3+ installed on Windows 10 so my scripts can utilize it along with PyInstaller?

I have found and used several advisories on the internet but no matter what I do I wind up with ModuleNotFoundError: No module named 'gi'

My expected result is to be able to use GTK3 however no success to date.

1
Possible duplicate problem is explained heretheGtknerd
Namely, your major and minot versions of Python have to match the versions Gtk is compiled with.theGtknerd
If you figure out the solution, please post an answer or remove this question to keep this site cleaned uptheGtknerd

1 Answers

-2
votes

Basically I gave up on GTK and moved my project to wxPython. It's a lot of work but so far the code works on Linux, Windows and Os X