From: Werner F. B. <wer...@fr...> - 2012-08-31 15:41:57
|
Hi, On 31/08/2012 16:42, Jonno wrote: > > > On Fri, Aug 31, 2012 at 2:18 AM, Werner F. Bruhin <wer...@fr... > <mailto:wer...@fr...>> wrote: > > > I am still on mpl 0.99.3 and this works for me, what mpl version are you > using? > > import matplotlib as mpl > data_files += mpl.get_py2exe_datafiles() > > But then I don't use mathtext. > > I'm on 1.1.0 > > > > > I tried manually copying the entire mpl-data folder into the dist > folder > > after running py2exe on setup.py but still I get the same error. > > > > Does data_files do anything other than include files and > directories in > > the dist folder? > > It just copies it to the correct location in your distribution folder, > i.e. for mpl I get "mpl-data" and it contains the "STIX...." fonts. > > Do your font files end up directly in \mpl-data or in \mpl-data\font or > something else? They are in the subfolder "fonts" not the "s" (with subfolders "afm", "pdfcorefonts" and "ttf") and then there is also folders "images" and "example" and three files "lineprops.glade", "matplotlib.conf" and "matplotlib.rc". > I think (hope) my issue might be the findfont function is just looking > in the wrong place. Maybe setting the verbose level will help you diagnose this. import matplotlib as mpl mpl.verbose.level = u'debug' > > > It seems that the findfont method in matplotlib's font_manager isn't > > working after running through py2exe and I guess when _get_glyph in > > mathtext.pyo attempts to use Bitstream Vera Sans font. > > > > Any ideas anyone? > > IIRC there were some issues with this in some of the MPL versions > 1.0..x. > > BTW, you are not using py2exe optimize=1 ? If yes, try 2 or 3. > > I've tried optimize = 2 and the default (?). Don't know what the default is, I would guess "3", ise "optimize=2" in my stuff. Werner |