I am building an app with tkinter, cx_freeze and I have Anaconda installed. The app is taking a really long time to open (30 seconds). I think it has something to do with the tzdata that is in the ananconda tcl folders as I can see it opening these up when I ran a process monitor on it. If I delete these from my anaconda folders, will this break anything? Is there a way around this?
from cx_Freeze import setup, Executable
import os.path
base = None
PYTHON_INSTALL_DIR = os.path.dirname(os.path.dirname(os.__file__))
os.environ['TCL_LIBRARY'] = os.path.join(PYTHON_INSTALL_DIR, 'tcl', 'tcl8.6')
os.environ['TK_LIBRARY'] = os.path.join(PYTHON_INSTALL_DIR, 'tcl', 'tk8.6')
executables = [Executable("RunExcelMacro.py", base=base)]
packages = ["idna","tkinter","os","win32com.client"]
options = {
'build_exe': {
'packages':packages,'include_files':[
os.path.join(PYTHON_INSTALL_DIR, 'DLLs', 'tk86t.dll'),
os.path.join(PYTHON_INSTALL_DIR, 'DLLs', 'tcl86t.dll'),
],
},
}
#os.environ['TCL_LIBRARY'] = r'C:\ProgramData\Anaconda3\tcl\tcl8.6'
#os.environ['TK_LIBRARY'] = r'C:\ProgramData\Anaconda3\tcl\tk8.6'
setup(
name = "Background Excel Executor",
options = options,
version = "1.0",
description = 'Runs an excel macro in the background',
executables = executables
)