views:

52

answers:

1

I have an application put together in py2app on OS X 10.6 which uses Matplotlib to generate graphs. (Using py2app version 0.5.3 and matplotlib version 0.99.3, if it matters.) I have the Tex formatting option enabled:

...
from matplotlib import rc
rc('text', usetex=True)
...

The script works fine when executed in the command line, including the Tex formatting. The application is created with py2app:

py2applet --make-setup MyApplication.py
python setup.py py2app

There are no errors in creating or opening the application. However, when I try to generate a plot in the application, I get the error:

RuntimeError: Could not obtain dvipng version

Is it because py2app is not including dvipng in the application itself? What's the best way to go about fixing this?

+1  A: 

By adding:

OPTIONS = {'argv_emulation': True, 'packages':['matplotlib']}

to my setup.py, I get this to work correctly when the application is opened from the command line. Strangely though, when opened by another means (double clicking in the applications folder, for example) I have the same problems I started with. Still looking for a full fix.

Brad