Hello,

I am on a Windows 7 machine (64 bit), with Python 2.6, numpy 1.4.0, and py2exe 0.6.9

I wrote a simple test module with only one line:
# Begin test Code #
import numpy
# End test Code #

When I use py2exe with this module I get the following error:
# Begin Error #
........
  File "numpy\linalg\lapack_lite.pyc", line 10, in __load
ImportError: DLL load failed: The specific module could not be found
# End Error #

The actual code in numpy.linalg.lapack_lite.py looks like this:
# Begin numpy Code #
def __load():
    import imp, os, sys
    try:
        dirname = os.path.dirname(__loader__.archive)
    except NameError:
        dirname = sys.prefix
    path = os.path.join(dirname, 'numpy.linalg.lapack_lite.pyd')
    #print "py2exe extension module", __name__, "->", path
    mod = imp.load_dynamic(__name__, path)
##    mod.frozen = 1
__load()
del __load
# End numpy Code#

And my setup.py looks like this:
# Begin Setup.py #
from distutils.core import setup
import py2exe

import shutil
shutil.rmtree("build",ignore_errors=True)
shutil.rmtree("dist",ignore_errors=True)

from glob import glob
import sys

data_files = [("Microsoft.VC90.CRT",glob(r'C:\PyElmTree\dev\ms-vc-runtime\*.*')),("resources",glob(r'C:\PyElmTree\Proctor\resources\*.*'))]

includes = ["numpy"]
excludes = []
packages = []
dll_excludes = []
icon_resources = [(1, r"resources/Elm Tree ico.ico")]

setup( console=[{"script":'Proctor/test.py'}],
        options = {"py2exe": {#"compressed":2,
                            #"optimize":1,
                            "includes":includes,
                            "excludes":excludes,
                            "packages":packages,
                            "dll_excludes":dll_excludes,
                            #"bundle_files":2,###Do Not Use...will crash....
                            "dist_dir":'dist',
                            #"xref":False,
                            #"skip_archive":False,
                            #"ascii":False,
                            #"custom_boot_script":'',
                            }
                },
        zipfile = None,
        data_files=data_files)
# End Setup.py #

What is particularly interesting about this is that my .exe works fine if I have python installed.  However if I uninstall python (or just manually change the name of the python root directory) my .exe fails with the above error.  And yes numpy.linalg.lapack_lite.pyd is in my root dist folder.

Anyone have any clues as to the problem?  Why is my .exe looking in my c:\Python26 folder for pyd files?


Warm Regards,
Andrew Kelly