[wxPython-users] Re: Recommend a plotting library?

Werner F. Bruhin werner.bruhin at free.fr
Wed Apr 11 10:44:17 PDT 2007


Hi Grant,

Grant Edwards wrote:
> On 2007-04-11, Andrea Gavana <andrea.gavana at gmail.com> wrote:
>
>   
>> 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?  Were do you set it?

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']}}


Werner




More information about the wxpython-users mailing list