[Numpy-discussion] Error involving import_libnumarray in packaged program
Todd Miller
jmiller at stsci.edu
Tue Oct 11 09:13:15 CDT 2005
Russell E. Owen wrote:
>If I convert my python code to an application (Windows via py2exe or Mac
>via bundlebuilder) it fails with the following error:
>
>Fatal Python error: Call to API function without first calling
>import_libnumarray() in Src/_convmodule.c
>
>
This currently (1.3.3) happens when a numarray API function is called
before the API is successfully initialized. Although the message was
intended as an aid to extension writers, in this case numarray is
failing to import altogether. At one point numarray had a fatal
error for import failures but I removed it at someone's request. I've
restored it because I think it's most commonly fatal anyway and removing
the message just obfuscated the problem. The non-fatal behavior is now
in the _import_libnumarray() macro.
>I can force *all* of numarray into the application, which avoids the
>
>
This is what you need to do. It should be possible to factor out (or
not explicitly list) numarray's Packages, but core numarray is not
meant to be distributed in pieces. The many type-specific extensions
were only added to work around a compiler problem, not to lighten
binary distributions.
>issue. But that is overkill. Is there some simpler way to solve this,
>
>
Unfortunately, I think it's just necessary to (a) include all of core
numarray and (b) help out automated tools (which choke on circular
dependencies) by explicitly listing numarray's core extensions.
Regards,
Todd
More information about the Numpy-discussion
mailing list