problem with MPL+py2exe (wx app needs qt?)

Many thanks, that helper.

After some more problems with scipy, I got a working EXE.

PyQt4 is still in the library, though. Eating almost 15Mb... Now all I
have to do is to find out how to remove it..

cheers

Carlos

···

On Mon, Sep 13, 2010 at 18:47, Goyo <goyodiaz@...287...> wrote:

2010/9/13 Carlos Grohmann <carlos.grohmann@...287...>:

Hello all,

I'm trying to build an executable distribution of an app I'm working
using py2exe.

After a lot of googling, I found what it seems to be a good
combination of parameters, but when I try to run the .exe, it fails.

The .log file shows me that the module backend_qt4agg wasn't found:

ImportError: No module named backend_qt4agg

Also, using py2exe -x shows me that PyQt4 is being imported by
matplotlib.pyplot.

The thing is, this is a WxPython application.

Why is pyplot importing pyqt?? How do I stop it?

Maybe it's specified in the matplotlib.rc.
Make sure your intended backend is in use *before* you import pyplot:

import matplotlib as mpl
mpl.use('WXAgg')
import pyplot as plt

--
Prof. Carlos Henrique Grohmann - Geologist D.Sc.
Institute of Geosciences - Univ. of São Paulo, Brazil
http://www.igc.usp.br/pessoais/guano
http://lattes.cnpq.br/5846052449613692
Linux User #89721
________________
Can’t stop the signal.

Have you read the info on py2exe wiki relating to matplotlib

http://www.py2exe.org/index.cgi/MatPlotLib
Have a look at section on "Backends"

Steve

···

On 14/09/2010 8:18 AM, Carlos Grohmann wrote:

Many thanks, that helper.

After some more problems with scipy, I got a working EXE.

PyQt4 is still in the library, though. Eating almost 15Mb... Now all I
have to do is to find out how to remove it..

cheers

Carlos