Hi Everyone !!

je souhaite créer un exécutable de mon programme via cx_freeze. Mais le fichier nom.exe crée dan le dossier build - apres avoir lancer la cmd : python setup.py build- ne se lance pas , il me donne l'erreur suivante :

file.exe n'est pas une application Win32 valide

j'utilise Tkinter dans mon code; et j'ai bien met base="Win32GUI"; voila mon programme setup

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import sys, os
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')
 
 
includes = ["tkinter"]
include_files = ["image"]
 
options = {"includes": includes,
           "include_files": include_files,
           }
 
base="Win32GUI"
 
exe = Executable(
 
    script="EssFreeze.py",
 
    base=base,
 
    )
 
 
#########################################################################
#                          SETUP PREPARATION							#
#########################################################################
setup(
    name = "App",
    version = "1.1",
    description = "waaaalo",
    options = {"build_exe": options},
    executables = [exe]
    )
Merci !!