I have previously had success with py2exe and matplotlib, using a specialized setup.py like the attached one (which is adapted from http://www.py2exe.org/index.cgi/MatPlotLib).
However, now I have tried to go a step further and integrate some Tkinter controls in the GUI for a prototype, see attached alphabeta.py
If I do a python setup.exe py2exe with this setup file on the attached Tkinter/matplotlib and alphabeta.exe is successfully created.
However, it does not run for everyone else:
Myself: Works like a charm
A user with a python environment who make py2exes himself: Crashes on startup with the attached error log
A user with just a Python environment: Works!
A user with no Python environment: Crashes on startup with the same log.
The log does not give me any good ideas as to how I could modify setup.py to get it working.
Any good ideas?
Some details about my environment when running py2exe
OS. Win XP SP3
A few days ago I asked for help getting hole through to a matplotlib/Tkinter application. I was not subscribed to this list then and could not reply on the answers. But the answers were useful, thanks! In addition, one respondend asked if I knew how to update a graph without having to clear the canvas and do everything all over?
Well, I did not know the answer at that time, but the alphabeta.py example actually does it in a “cooler way”, which updates the data in the Line2D instance, which is returned when calling subplot.plot(…)
That basic approach is also described quite well here:
Maybe the alphabeta.py could be added to the examples for Tkinter integration as a slightly more advanced example of Tkinter integration?
alphabeta.py (11.7 KB)
setup.py (2.04 KB)
alphabeta.exe.log (4.57 KB)