I *finally* got this to work!!! Thanks to Werner's message, I found the culpit: the matplotlibrc file copied to the dist directory contains the TkAgg backend. All I had to do is to change *that* file to say:
backend : WXAgg Note that it's not the matplotlibrc in the installed copy - but the one in the resulting dist directory. In addition, I have to do a: set MATPLOTLIBDATA=.\mpl-data before I start the exe file. I don't know why this is necessary because the code for _get_data_path appears to look at that directory by default but if I don't set this, it can't find the data files. In any event, it works now - after bumping head for 2 weeks! Thanks everybody. > -----Original Message----- > From: Werner F. Bruhin [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 20, 2008 1:45 AM > To: [EMAIL PROTECTED] > Cc: matplotlib-users@lists.sourceforge.net > Subject: Re: [Matplotlib-users] MatPlotLib + Py2exe, backend problems ... > > > Hi, > > [EMAIL PROTECTED] wrote: > > So, do I understand this correctly: > > > > In order to get rid of the Tkinter problem when > > building a matplotlib application using py2exe, I need > > 0.91.2 ver of matplotlib and use the setup.cfg file to > > select the backend I want (wxpython in my case). Then > > run py2exe to build the ap. Correct? > > > I haven't tried it with 0.91.x but with 0.90 I used a > matplotlib exe installer for Windows and I can create a > distribution of my application with py2exe which does NOT > contain tkinter. > > > But then, as I posted earlier, this create a new > > problem for me in that py2exe says it can't find wxmsw26uh_vc.dll - > > even though the file exists. > > > That dll should no longer be needed by matplotlib. Obviously > if you use a wxPython build you will get the it, i.e. I am on > 2.8 so I have a bunch of "wxmsw26uh???.dll" files in my dist folder. > > What I need is a version of 0.91.2 ver of matplotlib > > that works with Python 2.3 to see if that works, or I > > guess I would include Tkinter with my exe? > > > There was another message from Stef which might be the > explanation, the default matplotlibrc file is defining TKAgg > as the default backend, so change it to the following: > > backend : WXAgg > numerix : numpy # numpy, Numeric or numarray > > > Werner > -- John Henry ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users