[英]cx_freeze : compiled tkinter app is not lauching
這是我第一次使用cx_freeze,我確實需要幫助,我一直在尋找無處不在,但找不到答案。
我在編譯過程中沒有任何錯誤,但是可執行文件什么都不做。 有人可以解釋一下為什么嗎?
這是我的項目結構:
應用
我不知道在安裝程序中將cell.py文件包含在哪里,因為它現在在文件Modules中。 而且我不確定Tkinter應該包含還是排除。
這是setup.py文件:
import sys
from cx_Freeze import setup, Executable
executables = [
Executable("application.py")
]
buildOptions = dict(
compressed = True,
includes = ["sys","re","PIL","ttk","xlrd","xlutils","datetime","string","Tkinter"],
include_files = ["responsible.xls","favicon.ico","logo.jpg"],
excludes = []
path = sys.path + ["modules"]
)
setup(
name = "test",
version = "1.1.1.0",
description = "test",
options = dict(build_exe = buildOptions),
executables = executables
)
您可以使用include_files選項添加要包括的目錄。 因此,代碼的這一部分應如下所示:
buildOptions = dict(
compressed = True,
includes = ["sys","re","PIL","ttk","xlrd","xlutils","datetime","string","Tkinter"],
include_files = ["responsible.xls","favicon.ico","logo.jpg", "modules"],
excludes = []
path = sys.path + ["modules"]
)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.