0

click to see the error

click to see the error

that error apprerd after I builded with cx_freeze. and my setup.py code is

import sys
from cx_Freeze import setup, Executable
import numpy.core._methods
import numpy.lib.format
import os


build_exe_options = dict(
    compressed = True,
    includes = ["os","operator", "requests", "konlpy", "bs4", "copy", "jpype","numpy","idna","lxml","datetime","pygame","os","PIL","wordcloud","matplotlib","tkinter"],
    include_files = []
)





os.environ['TCL_LIBRARY'] = r'C:\Users\airne\Anaconda3\tcl\tcl8.6'
os.environ['TK_LIBRARY'] = r'C:\Users\airne\Anaconda3\tcl\tk8.6'

setup(
    name = "Search Key Word",
    version = "2.0",
    author = "airnew",
    description = "검색엔진 키워드 분석",
    options = {"build_exe": {"packages":["os","operator","requests","konlpy","bs4","copy","jpype","numpy","idna","lxml","datetime","pygame","os","PIL","wordcloud","matplotlib","tkinter"]}},
    executables = [Executable("SearchKeyWord.py",base = "Win32GUI")],
)
Vaibhav Mule
  • 5,016
  • 4
  • 35
  • 52
  • Is that the full traceback? Also prefer Pyinstaller over py2exe/py2app/cx_Freeze. – Kotauskas Sep 22 '17 at 07:25
  • yes that's the full error – 이루이루 Sep 22 '17 at 07:28
  • Possible duplicate of [When using cx\_Freeze and tkinter I get: "DLL load failed: The specified module could not be found." (Python 3.5.3)](https://stackoverflow.com/questions/42323533/when-using-cx-freeze-and-tkinter-i-get-dll-load-failed-the-specified-module-c) – jpeg Sep 10 '18 at 15:11

1 Answers1

0

I've had similar problem some time ago. That worked for me:

import sys
from cx_Freeze import setup, Executable
import os.path


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')

options = {
    'build_exe': {
        'include_files':[
            os.path.join(PYTHON_INSTALL_DIR, 'DLLs', 'tk86t.dll'),
            os.path.join(PYTHON_INSTALL_DIR, 'DLLs', 'tcl86t.dll'),
         ],
    },
}
JJAACCEeEKK
  • 194
  • 1
  • 11
  • For `cx_Freeze` version 5.1.1, the DLLs need to be copied into a subdirectory `lib` of the build directory, see [this answer](https://stackoverflow.com/a/52257858/8516269). – jpeg Sep 10 '18 at 19:36
  • @jpeg it's already inside. and still gave me error. what should I do :(. the exact same error – greendino Jun 12 '20 at 19:33