Getting “ImportError: DLL load failed: The specified module could not be found” when using cx_Freeze even with tcl86t.dll and tk86t.dll added in
I am trying to convert a .py file to .exe using cx_Freeze 5.1.1., but an ImportError: DLL load failed pops up every time I try to run the file. Based on the suggested solutions here and here , I added tcl86t.dll and tk86t.dll to the list of included files. They appear in the build folder, but the error message keeps popping up. Here is my setup.py: import sys import os from cx_Freeze import setup, Executable os.environ["TCL_LIBRARY"] = r"C:/Users/Name/AppData/Local/Programs/Python/Python36-32/tcl/tcl8.6" os.environ["TK_LIBRARY"] = r"C:/Users/Name/AppData/Local/Programs/Python/Python36-32/tcl