Matplotlib, py2exe and pytz

scott sh_snyder at yahoo.com
Fri Feb 18 21:02:18 EST 2005


I am trying to convert a python app that uses matplotlib to a
standalone executable using py2exe.

After running py2exe and executing my app I get the following stack
trace:

Traceback (most recent call last):
  File "gcToCsv.py", line 5, in ?
  File "plot_output.pyc", line 1, in ?
  File "pylab.pyc", line 1, in ?
  File "matplotlib\pylab.pyc", line 194, in ?
  File "matplotlib\axes.pyc", line 46, in ?
  File "matplotlib\dates.pyc", line 94, in ?
  File "pytz\__init__.pyc", line 53, in timezone
KeyError: 'UTC'

It appears that the instructions on the matplotlib web site and wiki
are incomplete and the pytz.zoneinfo package is not being included in
the finished dist directory.

I tried adding an opt line to setup.py
opts = {"py2exe": {"packages": ["pytz\zoneinfo"] } }
but still no joy.

Can someone tell me the correct setup.py file to use for including
matplotlib with an app using py2exe?

Thanks,

Scott




More information about the Python-list mailing list