Matplotlib, py2exe and pytz

John Hunter jdhunter at ace.bsd.uchicago.edu
Sat Feb 19 21:11:36 EST 2005


>>>>> "scott" == scott  <sh_snyder at yahoo.com> writes:

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

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

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

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

In your script that you are trying to freeze, do, 

  import pytz
  import dateutil

as a hint to py2exe that you want these modules.  Does this help?

Does the script you are trying to freeze explicitly use matplotlib
date functionality?

JDH



More information about the Python-list mailing list