app runs fine with interpreter, but not under py2exe

Thomas Heller theller at
Sun Mar 16 12:01:42 CET 2008

Doug Morse schrieb:
> Peter,
> Genius!  You nailed it -- thanks!
> py2exe is apparently getting confused by the fact that packages "Numeric" and
> "numpy" both have files multiarray.pyd and umath.pyd.  It copies just one of
> each -- from $PYTHONHOME/Lib/site-packages/numpy/core -- and puts both of them
> into the top-level of the created "dist" directory.  Also, there are no such
> files as multiarray.pyc and umath.pyc in my python installation, but py2exe
> seems to create these (in the dist and dist/numpy/core directories) -- they
> are small (e.g., 526 bytes) and I'm guessing that they are stubs that simply
> point python to the matching .pyd that py2exe relocated.
> Just for completeness and perhaps a bit of additional clarity, here's a
> limited directory listing of what the steps in the previous paragraph produce:
>     morse> find dist | egrep "(multia|umath)" | xargs ls -l
>     -rwxr-xr-x 1 morse None  26624 Nov 28  2006 dist/multiarray.pyd
>     -rwxr-xr-x 1 morse None 348160 Nov  8 16:16 dist/numpy/core/multiarray.pyd
>     -rwxr-xr-x 1 morse None 192512 Nov  8 16:16 dist/numpy/core/umath.pyd
>     -rwxr-xr-x 1 morse None  54272 Nov 28  2006 dist/umath.pyd
> Is this something I should pursue getting the py2exe folks to fix / work with
> them on fixing?  In investigating this issue, I noted that a lot of other
> py2exe problems seem to revolve around confusions when duplicate files exist
> in different modules.  I wouldn't thinking that getting py2exe to pay better
> attention to the containing modules when building it's dependency tree would
> be that difficult (or is it)?

I have the impression that this issue may already be fixed in py2exe CVS but
noone bothered to do a release.  Here is the corresponding changelog entry:

	* Patch from Grant Edwards, slightly adjusted:
	py2exe now renames the pyd files that it copies into the dist
	directory so that they include the package name.  This prevents
	name conflicts.

I have created installers and uploaded them (for testing!) to the starship:

Please try them out.


More information about the Python-list mailing list