I am using cx_freeze to transfer a python file to a exe. the problem is when i exclude tkinter in the setup.py, i can generate the exe file successfully, but when execute the exe file, it says No Module named tkinter
.
build_exe_options = {"packages": ["os","numpy","time","optparse","linecache","pandas",
"matplotlib","PIL"], "excludes": ["tkinter"]}
but when I try to include tkinter
, it just can't generate the exe file.
build_exe_options = {"packages": ["os","numpy","time","optparse","linecache","pandas",
"matplotlib","PIL","tkinter"]}
File "C:\Users\changchun_xu\AppData\Local\Programs\Python\Python36-32\lib\os.py", line 669, in __getitem__
raise KeyError(key) from None
KeyError: 'TCL_LIBRARY'