Py2exe - win32api.pyc ImportError DLL load failed

前端 未结 4 1520
暗喜
暗喜 2020-12-05 12:05

I am trying to use py2exe to distribute a python application I have written. Everything seems to go OK, but when I run it on another machine it fails with the following err

4条回答
  •  孤城傲影
    2020-12-05 12:48

    Try adding win32api to your packages, in the options dictionary.

    Here's an example:

    excludes = ["pywin", "pywin.debugger"] # there will be more in real life...
    options = dict(optimize=2,
               dist_dir="build",
               excludes=excludes,
               packages=["win32api"]) 
    setup(
        name="MyCoolApp",
        options=dict(py2exe=options),
        # etc ...
    

提交回复
热议问题