Title Standalone: Problem on windows with pygobject
Priority bug Status testing
Superseder Nosy List alfazaz
Assigned To alfazaz Keywords standalone, wrong_execution

Created on 2015-09-06.15:13:59 by alfazaz, last changed by alfazaz.

File name Uploaded Type Edit Remove
Test.dwi alfazaz, 2015-09-07.21:12:42 application/octet-stream
msg1535 (view) Author: alfazaz Date: 2015-09-12.13:04:24
All right, thanks. I can do without for the moment so no problem !

Have a nice day
msg1534 (view) Author: kayhayen Date: 2015-09-12.13:02:45
So, this will need a Nuitka plugin, that makes sure the meta path based loader 
works for it too. It needs to generate hidden dependencies and to patch the 
meta path based loader.

Seems doable but trick. Plugins are not yet ready for prime time. I am going 
to finish "multiprocessing" first, then tackle this.

msg1533 (view) Author: alfazaz Date: 2015-09-12.13:01:15
Ok. So do I need to do something ?
msg1532 (view) Author: kayhayen Date: 2015-09-12.12:43:55
So, thanks to the link you gave, I was able to install PyGTK. It's incredible how the download link 
is broken, pip does garbage, ... I wonder how relevant it really is these days.

And I could reproduce the issue.

Seems caused by this:

from ..importer import DynamicImporter # that will be "gi.importer".


That's from "gi.repository" package code.

msg1523 (view) Author: alfazaz Date: 2015-09-10.20:08:03
On the last message of
the pygi maintainer says that there is a Nuitka problem : there is no specific
pygi support like pyqt.

He also posted a protocol to be able to run a program compiled with nuitka and
using pygi on

Perhaps nuitka could be more efficient with pygi.

Hope this helps !
msg1510 (view) Author: alfazaz Date: 2015-09-07.21:12:42
I don't know if it can help, but here is the Dependency Walker file related to
the execution of my Test.exe...
msg1509 (view) Author: alfazaz Date: 2015-09-07.21:05:15
Hi !

I retried with factory branch from git on windows and I get same errors as in my
first message. :-(

More informations :

* On linux, no problems for me, even on my big program : everything works great
with nuitka (and it's really cool !).

* On windows, my python programs with gtk work fine without freezing with nuitka
but, after freeze, I have the errors I told before. I use Gtk comes from (installed with

I can do everything you tell me to debug this (even if windows is not my "cup of
tea" but I must do with it :-( ).

Thanks in advance !
msg1508 (view) Author: kayhayen Date: 2015-09-07.19:32:59

I was trying to reproduce on Linux, and got another error, which I fixed, and then it worked. Maybe you 
can retry. Last time I tried to install GTK for Windows, it was hell. But maybe that was the issue 
already. Use the "factory" branch of official git.

msg1503 (view) Author: alfazaz Date: 2015-09-06.15:13:59
Hello !

I have a problem with executable made with nuitka on windows with a big program.
To help on debug, I made a simple test case. Here it is...

* First, I create with only one line :

from gi.repository import Gtk

* Then, I compile it with 

nuitka --standalone

There is no error on linux and windows here.

* Then, I execute Test.exe : there's no problem on linux but on windows, I get
this :
Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 2158, in _find_spec
AttributeError: 'DynamicImporter' object has no attribute 'find_spec'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "E:\Chemin\Test.dist\",
line 1, in <module>
  File "E:\Chemin\Test.dist\gi\importe", line 53, in find_module
ImportError: cannot import name Gtk, introspection typelib not found

On windows, Gtk comes from .

Do you know how to make Gtk working with nuitka ? Is there any mistake from me ?

Thanks in advance for help...

Date User Action Args
2015-09-12 13:04:24alfazazsetmessages: + msg1535
2015-09-12 13:02:45kayhayensetmessages: + msg1534
2015-09-12 13:01:15alfazazsetmessages: + msg1533
2015-09-12 12:43:55kayhayensetmessages: + msg1532
2015-09-10 20:08:03alfazazsetmessages: + msg1523
2015-09-07 21:12:42alfazazsetfiles: + Test.dwi
messages: + msg1510
2015-09-07 21:05:15alfazazsetmessages: + msg1509
2015-09-07 19:35:27kayhayensettitle: Problem on windows with pygobject -> Standalone: Problem on windows with pygobject
2015-09-07 19:32:59kayhayensetstatus: unread -> testing
assignedto: alfazaz
messages: + msg1508
keyword: + wrong_execution, standalone
2015-09-06 15:13:59alfazazcreate