1

我用 cx_Freeze 编译了一些 Python 脚本,但编译的脚本给了我这个错误:

点击查看错误

setup.py:

from cx_Freeze import setup, Executable

executables = [
    Executable('USBAIO.py', base="Win32GUI", icon="Icons\\icon.ico"),
    Executable('ui.py', base="Win32GUI", icon="Icons\\icon.ico"),
    Executable("formatter.py", base="Win32GUI", icon="Icons\\cicon.ico"),
    Executable("updater.py", base="Win32GUI", icon="Icons\\uicon.ico"),
    Executable("permremove.py", base="Win32GUI", icon="Icons\\cicon.ico")
    ]

Packages = ["tkinter","functools", "time", "win32api",
                    "threading", "subprocess", "psutil", "os",
                    "shutil", "re", "requests", "sys", "ctypes",
                    "argparse", "google_drive_downloader",
                    "win32file", "win32con"
                    ]

Include = ["Icons", "version.txt", "icon.ico"]

setup(
    name="myapp",
    options={"build_exe":{"packages":Packages,"include_files":Include}},
    description = "myapp",
    executables = executables
)

Python版本:3.8

视窗:8.1 专业版 WMC

cx_Freeze:6.0b1

4

1 回答 1

1

嗯,我找到了答案。由 cx_Freeze 无法抓取的 DLL 引起的错误。当我复制libffi-7.dlllib文件夹时,我的应用程序工作正常。这是我的研究:研究

于 2019-11-22T09:45:17.027 回答