Hi,
I have Windows XP, Python 2.6.4, wxPython 2.8.10.1, py2exe 0.6.9 for python 2.6. I'm trying to create an exe of a wxPython program using a modified setup.py that I got out of the samples directory for single file wxpython gui programs.

To be able to create anything I had to copy msvcp90.dll into the source directory, and then after creating the exe, run the .exe in a directory with msvcr90.dll available. (I have the most recent MS Visual Studio installed, so I had these files on my system.)

However, when I run the exe I get R6034 "attempt to load the c-runtime library incorrectly".

See listing of my setup.py below.

Any help is greatly appreciated!

Rick King
Southfield MI



My setup.py looks like this, modified from the samples that come with py2exe:

# - single file exe using wxPython as GUI.

from distutils.core import setup
import py2exe
import sys

# If run without args, build executables, in quiet mode.
if len(sys.argv) == 1:
    sys.argv.append("py2exe")
    sys.argv.append("-q")

class Target:
    def __init__(self, **kw):
        self.__dict__.update(kw)
        # for the versioninfo resources
        self.version = "0.1"
        self.company_name = "Naturalister"
        self.copyright = "Rick King"
        self.name = "FileTool"

manifest_template = '''
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
    version="5.0.0.0"
    processorArchitecture="x86"
    name="%(prog)s"
    type="win32"
/>
<description>%(prog)s Program</description>
<dependency>
    <dependentAssembly>
        <assemblyIdentity
            type="win32"
            name="Microsoft.Windows.Common-Controls"
            version="6.0.0.0"
            processorArchitecture="X86"
            publicKeyToken="6595b64144ccf1df"
            language="*"
        />
    </dependentAssembly>
</dependency>
</assembly>
'''

RT_MANIFEST = 24

FileTool = Target(
    # used for the versioninfo resource
    description = "FileTool",

    # what to build
    script = "filetoolGUI.py",
    other_resources = [(RT_MANIFEST, 1, manifest_template % dict(prog="FileTool"))],
    icon_resources = [(1, "filetool.ico")],
    dest_base = "FileTool")

setup(
    options = {"py2exe": {"compressed": 1,
                          "optimize": 2,
                          "ascii": 1,
                          "bundle_files": 1}},
    zipfile = None,
    windows = [FileTool],
    )