I'm a french so sorry for my english. I actually create a Python 3.6.1 program that use tkinter, paramiko, telnetlib and many other, and I want to create an exe with cx_Freeze. With a "Hello World" program it success, but when I try with just Tkinter, it doesn't work. I have a screen of the error because I can't see it more than 0.5 seconds the terminal when I run the exe. So I join that screen with my setup.py.
setup.py:
import cx_Freeze
import os
os.environ['TCL_LIBRARY'] = r'C:\LOCAL_TO_PYTHON\Python35-32\tcl\tcl8.6'
os.environ['TK_LIBRARY'] = r'C:\LOCAL_TO_PYTHON\Python35-32\tcl\tk8.6'
executables= [cx_Freeze.Executable('exeTest.py',)]
cx_Freeze.setup(
name = "leTest",
options = {'built.exe':{'includes': ['tkinter','paramiko','telnetlib']}},
version = "1.0",
description = "Bonjour !",
executables = executables,
)
error:
Traceback (most recent call last):
File "C:\Python36\lib\site-packages\cx_Freeze\initscripts\__startup.py", in line 12, in <module>
__import__(name+"__init__")
File "C:\Python36\lib\site-packages\cx_Freeze\initscripts\Console.py", in line 24, in <module>
exec(code, m.__dict__)
File "exeTest.py", line 9, in <module>
File "C:\Python36\lib\tkinter\__init.py", in line 36, in <module>
import _tkinter # If this fails your Python may not be configured fot Tk
ImportError: DLL load failed: The specified module can not be found.
Thanks for reading and maybe for the help