[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] py2exe problems



That error looks very google-able now - I found this thread that seems related:
http://www.gossamer-threads.com/lists/python/python/629815?page=last

According to it, the problem seems to be that line 9 of numeric's precision.py:
---
from multiarray import zeros
---
imports numeric's multiarray when run normally, but for some reason
py2exe thinks the multiarray there should belong to numpy, and
includes it's version instead of numeric's. And the numpy's multiarray
doesn't like the numeric typecodes being passed to it.

I imagine this problem would happen to anyone who has both numpy and
numeric installed and then py2exe's a numeric using script.

The best thing would be to figure out how py2exe gets confused and
patch it so it's fixed for people in the future. As a workaround, you
could temporarily remove numpy or maybe tell py2exe to ignore numpy.

It might also be possible to modify the numeric source to explicitly
load it's own multiarray... maybe change the line in precision.py to
something like this:
-----------
from numeric.multiarray import zeros


On Sat, Mar 15, 2008 at 11:42 AM, Ian Mallett <geometrian@xxxxxxxxx> wrote:
> C:\dev\Python25\Projects\Pygame Programs\Parabola\4\dist>Parabola4.exe
> Traceback (most recent call last):
>   File "Parabola 4.py", line 1, in <module>
>   File "pygame\__init__.pyc", line 159, in <module>
>    File "pygame\surfarray.pyc", line 68, in <module>
>   File "pygame\_numericsurfarray.pyc", line 12, in <module>
>   File "pygame\_numericsurfarray.pyc", line 10, in __load
>    File "Numeric.pyc", line 93, in <module>
>   File "Precision.pyc", line 26, in <module>
>   File "Precision.pyc", line 23, in _fill_table
>   File "Precision.pyc", line 18, in _get_precisions
>  TypeError: data type not understood
>