Hi,
[EMAIL PROTECTED] wrote:
> 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
>
You shouldn't need to do this. Note in matplotlib.__init__.py, it looks
at a different folder if it is frozen by py2exe or py2app or ...:
# py2exe zips pure python, so still need special check
if getattr(sys,'frozen',None):
path = os.path.join(os.path.split(sys.path[0])[0], 'matplotlibdata')
So, if you use the sample setup.py I posted a while ago here and on the
wxPython list it will create the matplotlibdata folder in your
distribution (basically a copy of your mpl-data folder) folder.
> 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!
>
Hope the wall wasn't to hard, I always try this or the wxPython list
after a day or two ;-) .
See you
Werner
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users