2017-09-22 5 views
0

click to see the errorcx_freeze, erreur d'importation: charge de DLL a échoué (tkinter)

click to see the error

que apprerd d'erreur après avoir cx_freeze avec bâtis. et mon code setup.py est

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")], 
) 
+0

Est-ce la trace complète? Préférez également Pyinstaller sur py2exe/py2app/cx_Freeze. –

+0

oui c'est l'erreur complète –

Répondre

0

J'ai eu un problème similaire il y a quelque temps. Cela a fonctionné pour moi:

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'), 
     ], 
    }, 
} 
+0

Merci beaucoup! il a travaillé pour moi aussi –