我的程序正在 anaconda spyder 中运行。但是,在冻结它之后,所有使用 tkinter 模块的小部件都可以工作,但带有 xgboost 和 pandas 的小部件除外。没有显示错误,构建工作但按钮不起作用并且没有显示小部件。
我已经尝试在我的 setup.py 文件中导入并包含 xgboost,但所有其他带有 tkinter 的小部件都无法正常工作。仍然没有错误。有没有人遇到或解决过这个问题?
这是最接近的工作。这是我的 setup.py,当其他小部件与 tkinter 一起工作时,而不是与 xgboost 和 pandas 一起工作的小部件。
from cx_Freeze import setup, Executable
import sys
import os
includes = []
include_files = [r"C:/Users/USER/Anaconda3/DLLs/tcl86t.dll",
r"C:/Users/USER/Anaconda3/DLLs/tk86t.dll",
r"C:/Users/USER/SAMPLE/xgboost_USE.model",
r"C:/Users/USER/SAMPLE/P1.ico"]
os.environ['TCL_LIBRARY'] = "C:/Users/USER/Anaconda3/tcl/tcl8.6"
os.environ['TK_LIBRARY'] = "C:/Users/USER/Anaconda3/tcl/tk8.6"
base = 'Win32GUI' if sys.platform == 'win32' else None
setup(name=application_title, version='1.0', description='SAMPLE',
options={"build_exe": {"includes": includes, "include_files":
include_files}},executables=
[Executable(r'C:/Users/USER/SAMPLE/sample.py', base=base)])
Run Code Online (Sandbox Code Playgroud)
请帮忙。