【发布时间】:2021-03-18 00:11:11
【问题描述】:
我刚刚用 cx_Freeze 冻结了我的程序。当我尝试运行它时,它只是停止而没有显示任何错误消息,所以我想知道是否有任何方法可以知道我的程序或冻结脚本有什么问题:
import sys, os
from cx_Freeze import setup, Executable
PYTHON_INSTALL_DIR = os.path.dirname(os.path.dirname(os.__file__))
sys.path.append('pandastable')
includes = ["pandastable"]
includefiles = [
os.path.join(PYTHON_INSTALL_DIR, 'DLLs', 'tk86t.dll'),
os.path.join(PYTHON_INSTALL_DIR, 'DLLs', 'tcl86t.dll'),'ClasseAgents.py','ClasseData.py','ClassePerformance.py','ClasseTime.py','ClasseTraitement.py','PredictionFlux.py','icone.ico','VCbase.db'
]
# Dependencies are automatically detected, but it might need fine tuning.
build_exe_options = {"packages": ["os","numpy","matplotlib","pandas",
#"scipy","seaborn","IPython","statsmodels",
"pandastable"],
"excludes": ['seaborn','statsmodels'],
"namespace_packages": ['mpl_toolkits'],
"include_msvcr": True,
"includes": includes,
"include_files": includefiles}
base = None
if sys.platform == "win32":
base = "Win32GUI"
executables = [Executable("Main.py", base=base,
#copyDependentFiles = True,
targetName='TaskManager.exe',
shortcutName="TakManaer",
shortcutDir="DesktopFolder",
icon="icone.ico")]
setup( name = "Task manager for BPO",
version = "1.0",
description = "task manager est un gestionnaire de traitement intelligent",
options = {"build_exe": build_exe_options},
executables = executables)
【问题讨论】:
-
您是否尝试过从终端/cmd 提示符中启动冻结的 .exe?有时会在那里收到更多错误消息。
-
是的,但它没有给出任何错误消息
-
在冻结脚本时,您是否在输出中看到任何相关的错误消息或警告?如果没有,也许my answer 对一个类似的问题可以给你一些进一步的提示,特别是那里的第 3 点,最后是关于如何继续的一般建议。
标签: python-3.x anaconda cx-freeze