matplotlib, numpy and py2exe

I finally managed to build it without getting py2exe errors.

Needed to include package "numpy" and remove "distutils" package from numpy as py2exe was failing on "tests" - maybe this is not the right thing to do as I still get run time error when running the exe.

Here is the exception I currently get:
**** Thu Jul 06 17:43:19 2006 ****
Traceback (most recent call last):
   File "appwine.pyo", line 1333, in OnToolbarChart
   File "frameplotmpl.pyo", line 16, in ?
   File "matplotlib\numerix\__init__.pyo", line 66, in ?
   File "numpy\__init__.pyo", line 35, in ?
   File "numpy\_import_tools.pyo", line 173, in __call__
   File "numpy\_import_tools.pyo", line 68, in _init_info_modules
   File "<string>", line 1, in ?
   File "numpy\random\__init__.pyo", line 3, in ?
   File "numpy\random\mtrand.pyo", line 12, in ?
   File "numpy\random\mtrand.pyo", line 10, in __load
   File "numpy.pxi", line 32, in mtrand
AttributeError: 'module' object has no attribute 'dtype'

As mtrand is a .pyd I run out of things to try.

Any hints on how to get around this one would be appreciated, otherwise I guess I will go back an use Numeric instead.

Werner

Hi Werner,

I got this problem too, and I actually updated the py2exe wiki on what
to do when you see it. The problem is that there are multiple _sort
modules (_sort.pyd in numpy and others in the different numer*
packages.) Only some of them have dtype.

See the last section (seciton 5) of
http://starship.python.net/crew/theller/moin.cgi/MatPlotLib

My real solution to it was to remove all the other num* packages from
the system and just have numpy and scipy installed. This ensured that
I wasn't pulling in the other packges by accident.

-Jim

···

On 7/6/06, Werner F. Bruhin <werner.bruhin@...185...> wrote:

I finally managed to build it without getting py2exe errors.

Needed to include package "numpy" and remove "distutils" package from
numpy as py2exe was failing on "tests" - maybe this is not the right
thing to do as I still get run time error when running the exe.

Here is the exception I currently get:
**** Thu Jul 06 17:43:19 2006 ****
Traceback (most recent call last):
   File "appwine.pyo", line 1333, in OnToolbarChart
   File "frameplotmpl.pyo", line 16, in ?
   File "matplotlib\numerix\__init__.pyo", line 66, in ?
   File "numpy\__init__.pyo", line 35, in ?
   File "numpy\_import_tools.pyo", line 173, in __call__
   File "numpy\_import_tools.pyo", line 68, in _init_info_modules
   File "<string>", line 1, in ?
   File "numpy\random\__init__.pyo", line 3, in ?
   File "numpy\random\mtrand.pyo", line 12, in ?
   File "numpy\random\mtrand.pyo", line 10, in __load
   File "numpy.pxi", line 32, in mtrand
AttributeError: 'module' object has no attribute 'dtype'

As mtrand is a .pyd I run out of things to try.

Any hints on how to get around this one would be appreciated, otherwise
I guess I will go back an use Numeric instead.

Werner

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Hi James,

Thanks for the hints.

James Carroll wrote:

Hi Werner,

I got this problem too, and I actually updated the py2exe wiki on what
to do when you see it. The problem is that there are multiple _sort
modules (_sort.pyd in numpy and others in the different numer*
packages.) Only some of them have dtype.

See the last section (seciton 5) of
http://starship.python.net/crew/theller/moin.cgi/MatPlotLib

I have seen that, but it doesn't help.

I have only Numeric and numpy on my system. I only need one, just wanted to get up to date, so tried changing from Numeric to numpy. For testing I rename the folder of the one I don't want to use, so py2exe nor matplotlib can not find it.

I don't have a real need to change, so for the moment I will stay with Numeric and if I don't run into other problems with matplotlib 0.87.3 I stay with it otherwise I will go back to the version I used before and upgrade when I get around to move over to wxPython Unicode.

Werner

···

My real solution to it was to remove all the other num* packages from
the system and just have numpy and scipy installed. This ensured that
I wasn't pulling in the other packges by accident.

-Jim

On 7/6/06, Werner F. Bruhin <werner.bruhin@...185...> wrote:

I finally managed to build it without getting py2exe errors.

Needed to include package "numpy" and remove "distutils" package from
numpy as py2exe was failing on "tests" - maybe this is not the right
thing to do as I still get run time error when running the exe.

Here is the exception I currently get:
**** Thu Jul 06 17:43:19 2006 ****
Traceback (most recent call last):
   File "appwine.pyo", line 1333, in OnToolbarChart
   File "frameplotmpl.pyo", line 16, in ?
   File "matplotlib\numerix\__init__.pyo", line 66, in ?
   File "numpy\__init__.pyo", line 35, in ?
   File "numpy\_import_tools.pyo", line 173, in __call__
   File "numpy\_import_tools.pyo", line 68, in _init_info_modules
   File "<string>", line 1, in ?
   File "numpy\random\__init__.pyo", line 3, in ?
   File "numpy\random\mtrand.pyo", line 12, in ?
   File "numpy\random\mtrand.pyo", line 10, in __load
   File "numpy.pxi", line 32, in mtrand
AttributeError: 'module' object has no attribute 'dtype'

As mtrand is a .pyd I run out of things to try.

Any hints on how to get around this one would be appreciated, otherwise
I guess I will go back an use Numeric instead.

Werner

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users