Python 2.6 + Pytz 2009a + Py2exe problem

Jeff Peck jpeck at
Wed Mar 18 08:43:09 CET 2009

I've recently upgraded to python 2.6 and I'm having trouble building an
executable using the new Pytz package. The relevant section of is
below.  This was working under python 2.5 using an ancient version of pytz



    console = [dict(script =')],

    options = dict(

        py2exe = dict(

            packages = ['pytz', 'pyodbc', 'decimal', 'sqlalchemy'],

            typelibs=[('{00020813-0000-0000-C000-000000000046}', 0, 1, 4)],




When I try to run the resulting executable, I get:

pytz.UnknownTimeZoneError: 'US/Central'


I noticed that the old version of pytz I was using compiled each timezone
into a .pyc, and these would be included in the resulting for my
programs. When I build against the new pytz, these files are no longer
getting compiled to .pyc. Instead, when I check the pytz directory in, I see these files:






It appears that the zoneinfo directory is missing. I have tried pasting this
in manually with no luck. Any ideas?



Jeff Peck




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list