0
我想在cv_freeze
库中使用创建我的python脚本来exe应用程序。我的应用程序只使用tkinter
,但是当我尝试构建exe文件时:出现TCL_LIBRARY
错误。这是为什么?这是我的设置代码:创建python脚本为exe
import cx_Freeze
import sys
import matplotlib
base = None
if sys.platform == 'win32':
base = "Win32GUI"
executables = [cx_Freeze.Executable("tkinterVid28.py", base=base, icon="clienticon.ico")]
cx_Freeze.setup(
name = "SeaofBTC-Client",
options = {"build_exe": {"packages":["easygui","matplotlib"]}},
version = "0.01",
description = "Sea of BTC trading application",
executables = executables
)
,这是myGUI Python代码:
import tkinter
top = tkinter.Tk()
# Code to add widgets will go here...
top.mainloop()
我使用的python 3.6, 感谢帮助或没有帮助。
它现在生成的exe文件。但我得到这个错误,当我打开exe文件:http://i.imgur.com/v2YMpBN.png – odri
@odri试试这个https://stackoverflow.com/questions/43568915/import-tkinter-if-this-失败,您的python可能不会被配置为tk – James
感谢现在的工作。非常感谢! – odri