I have some scripts that ran on older matplotlib that now refuse to run.  I am out of ideas and some have tried to help... so I try again and try to ask the question with more detail.
 
My executable is packaged but when run, does not complete.  It "stops" when I start to use some Tk/GUI/Matplotlib backends in my code.
 
The primary/only? problem reported by py2exe when run, seems to be that several modules are reported as missing, as shown below.  Most seem to involve numpy.  What is odd about this (to me) is that I am unaware of the specifically why these would be needed.  In particular, I turned off import of numpy into my application, therefore assume I don't need, but I still get the same problem messaging.  If I do need it, it is on my machine and I am baffled why it wouldn't find it.
 
I suppose I could go through the list one by one and somehow add them - if someone tells me how.  However, I thought that was the function of py2exe, in part, to track these things/modules down.    I am not very clear on criteria to exclude, what should go in packages and data files line and have toyed with alternatives in these areas with no success to date.
 
Do I have some sort of path problem - the path structure shown is from a colleague and worked previous in my XP windows environment?  Any other thoughts?
 
The problem messaging is as follows:
Relevant source code from setup after this messaging
 

The following modules appear to be missing

['AppKit', 'Crypto.Cipher', 'FFT', 'Foundation', 'LinearAlgebra', 'MA', 'MLab',

'Matrix', 'Numeric', 'PyObjCTools', 'PyQt4', 'RandomArray', '_imaging_gif', 'bac

kends.draw_if_interactive', 'backends.new_figure_manager', 'backends.show', 'cai

ro', 'cairo.gtk', 'cephes', 'config.mplConfig', 'config.rcParams', 'config.rcdef

aults', 'config.save_config', 'configobj', 'email.Generator', 'email.Iterators',

 'email.Utils', 'enthought.pyface.action.api', 'enthought.pyface.dock.core', 'en

thought.pyface.dock.idockable', 'enthought.pyface.grid.grid_cell_renderer', 'ent

hought.resource.api', 'enthought.traits.ui.wx.ui_debug_editor', 'fltk', 'gd', 'g

object', 'gtk', 'gtk.glade', 'installHooks', 'maskedarray', 'matplotlib.enthough

t.pyface.action', 'mlab.amax', 'mlab.amin', 'numpy.core.ma', 'numpy.dft.old', 'n

umpy.fft', 'numpy.lib.mlab', 'numpy.linalg', 'numpy.linalg.old', 'numpy.ma', 'nu

mpy.oldnumeric', 'numpy.oldnumeric.fft', 'numpy.oldnumeric.linear_algebra', 'num

py.oldnumeric.matrix', 'numpy.oldnumeric.mlab', 'numpy.oldnumeric.random_array',

 'numpy.random', 'numpy.testing', 'objc', 'paint', 'pango', 'pest', 'pest.syncFi

les', 'pkg_resources', 'pyExcelerator', 'pyemf', 'qt', 'terminalcommand', 'trait

_sheet', 'matplotlib.numerix.array', 'matplotlib.numerix.asarray', 'matplotlib.n

umerix.ones', 'numarray.Complex', 'numarray.Complex32', 'numarray.Complex64', 'n

umarray.Float', 'numarray.Float32', 'numarray.Float64', 'numarray.Int', 'numarra

y.Int16', 'numarray.Int32', 'numarray.Int8', 'numarray.NumArray', 'numarray.UInt

16', 'numarray.UInt32', 'numarray.UInt8', 'numarray._dotblas', 'numarray.all', '

numarray.alltrue', 'numarray.asarray', 'numarray.dot', 'numarray.fromlist', 'num

array.shape', 'numarray.typecode', 'numarray.zeros']

 

My cobbled, newbie code for py2exe: / tkAgg backend

 

# setup.py

from distutils.core import setup
import os
from os.path import join

import glob
import py2exe
from py2exe.build_exe import py2exe #this line from forum example
import sys
import matplotlib as mp

############################
############################
home=os.path.abspath(".")+os.sep
sys.argv.append("py2exe")


class Target:
    def __init__(self, **kw):
        self.__dict__.update(kw)
        # for the versioninfo resources
        self.version = "0.06"
        self.company_name ="XYZ"
        self.copyright = "2008"
        self.name = "eppc_NUMlog_Plotter"


sys.path.append(".")
sys.path.append("..")
###########################
###########################
                                       
zipfile=None

opts = {
    "py2exe": {
        "excludes": ["gdk.py","gtk.py"],
        "dll_excludes": [
            "libgdk_pixbuf-2.0-0.dll","libgobject-2.0-0.dll","libgdk-win32-2.0-0.dll",
            "wxmsw26uh_vc.dll"],
        #"dist_dir": "dist",
        "dist_dir": "C:\\Documents and Settings\\50613569\\Desktop\\packaging",
        "compressed":1,
        "packages": ['matplotlib','pytz'],
            }
        }

targets="""
    JforJ_g.py
    """

console=targets.split()
pythonHome = os.path.split(sys.executable)[0]
# by adding the dll file names with no target directory py2exe puts them into the dist directory
dataFiles=[pythonHome + "\msvcr71.dll", pythonHome + "\msvcp71.dll"]+ mp.get_py2exe_datafiles()

 

setup(console=console,
      options = opts,
      data_files=dataFiles,
    )

 

 



Never miss a thing. Make Yahoo your homepage.