我用 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