我使用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
Windows:8.1 Pro WMC
cx_Freeze:6.0b1
答案 0 :(得分:1)
好吧,我找到了答案。由cx_Freeze无法捕获的DLL引起的错误。
当我将libffi-7.dll
复制到lib
文件夹时,我的应用程序可以正常工作。
这是我的研究:research