我正在尝试将我的应用程序构建到.app文件中,并且我一直遇到以下错误。
[Errno 2] No such file or directory: '/Library/Frameworks/Tcl.framework/Versions/8.5/Tcl'
所以我下载了 ActiveTcl8.5 ,错误就消失了。现在我可以使用以下命令构建:
python3 setup_cx_freeze.py bdist_dmg
但是我的应用程序运行并立即关闭。我从cmd运行它以了解错误是什么,我得到的唯一反馈是LSOpenURLsWithRole()失败,错误-10810。我究竟做错了什么?为什么我需要Tcl才能使用cx冻结,为什么我的应用程序不想打开?这是我的设置文件。
import sys
from cx_Freeze import setup, Executable
build_exe_options = {"packages": ['tkinter', 'smb.SMBConnection'], "excludes": [], "includes": [], "include_files":['Project_Images', 'Project_Docs'], "bin_path_excludes": []}
setup(
name = "Test",
version = "2.51",
description = "Will this even work?",
options = {"build_exe": build_exe_options},
executables = [Executable("AccuAdmin.py")])
答案 0 :(得分:1)
Tcl是一种编程语言,与Python几乎同时发明。 Tkinter是嵌入式tcl解释器顶部的薄包装器,带有" tk"小部件扩展。没有tcl / tk你不能使用tkinter。