Recommend a plotting library?

By the way, if you post a sample that reproduces the problem you are
having, or a setup script that doesn't work with py2exe, I am sure you
will receive a lot of suggestions.
    
Here's the script I'm using right now:

# setup.py
from distutils.core import setup
import py2exe
import matplotlib

setup(windows=[{"script":"surfacedit.py"}],
      data_files=[('',['../win32/gnuplot/bin/wgnuplot.exe',
                       '../win32/gnuplot/bin/pgnuplot.exe',
                       '../win32/gnuplot/bin/wgnuplot_pipes.exe']
                  ) + matplotlib.get_py2exe_datafiles()],
      options={'py2exe': {'packages': ['matplotlib','pytz']}}
      )

[...]
creating python loader for extension 'numpy.dft.fftpack_lite'
creating python loader for extension 'matplotlib._windowing'
creating python loader for extension 'numpy.core._dotblas'
creating python loader for extension 'matplotlib.backends._na_backend_gdk'
creating python loader for extension 'matplotlib._ns_nxutils'
*** finding dlls needed ***
error: libgdk-win32-2.0-0.dll: No such file or directory

I don't have such a file on my system, but this is used with a "gdk"
backend?!

What backend are you using?

Dunno -- one of the wx ones I presume.

Were do you set it?

I don't. I'm using wxmpl which I assumed was taking care of
that since the wxmpl demo apps don't explicitly set a backend.

I do this at the top of my script which uses matplotlib.

import matplotlib
matplotlib.use('WXAgg')

Maybe it comes also from this line in your setup.py:

      options={'py2exe': {'packages': ['matplotlib','pytz']}}

You force the inclusion of all of matplotlib, following should be enough.

      options={'py2exe': {'packages': ['matplotlib.numerix','pytz']}}

Thanks, I'll give that a try.

···

On 2007-04-11, Werner F. Bruhin <werner.bruhin@free.fr> wrote:

--
Grant Edwards grante Yow! I wonder if I ought
                                  at to tell them about my
                               visi.com PREVIOUS LIFE as a COMPLETE
                                                   STRANGER?

Hi Grant,

> What backend are you using?

Dunno -- one of the wx ones I presume.

> Were do you set it?

I don't. I'm using wxmpl which I assumed was taking care of
that since the wxmpl demo apps don't explicitly set a backend.

A part of the suggestion given by Werner:

import matplotlib
matplotlib.use('WXAgg')

Try to add these lines to your setup.py script:

excludes = ["Tkconstants", "Tkinter", "tcl", '_gtkagg', '_tkagg']

excludes.extend(['_gtkagg','_tkagg','Tkconstants','pywin.debugger',
'pywin.debugger.dbgcon','pywin.dialogs',
'bsddb','curses','email','distutil','logging','readline','setuptools'])

dll_excludes = ['libgdk-win32-2.0-0.dll', 'libgobject-2.0 0.dll',
'tcl84.dll', 'tk84.dll']

You might also want to try out GUI2Exe:

http://xoomer.alice.it/infinity77/eng/freeware.html#gui2exe

That helps you in building executable files with py2exe.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/

···

On 4/11/07, Grant Edwards wrote: