Bonjour à tous,

Je vous sollicite aujourd'hui car je souhaite me lancer dans la création d'un exécutable à cx_freeze. Après avoir fait un premier test qui fonctionne avec un script simple helloworld.py je souhaite passer à quelque chose d'un peut plus compliqué et j'ai un message d'erreur que je n'arrive pas à résoudre provenant de distutils

Voici le setup.py
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
 
from cx_Freeze import setup, Executable
 
 
# On appelle la fonction setup
 
setup(
    name = "choixData1",
    version = "0.1",
    description = "Trace 1 grandeur",
    executables = [Executable("choixData1v51.py", base = None)],
)
les erreurs
c:\Python27\Scripts>C:\python27\python.exe setup.py build
running build
running build_exe
creating directory build\exe.win32-2.7
copying C:\python27\lib\site-packages\cx_Freeze\bases\Console.exe -> build\exe.win32-2.7\choixData1v51.exe
copying C:\python27\python27.dll -> build\exe.win32-2.7\python27.dll
Stamped: build\exe.win32-2.7\choixData1v51.exe
Traceback (most recent call last):
File "setup.py", line 10, in <module>
executables = [Executable("choixData1v51.py", base = None)],
File "C:\python27\lib\site-packages\cx_Freeze\dist.py", line 362, in setup
distutils.core.setup(**attrs)
File "C:\python27\lib\distutils\core.py", line 151, in setup
dist.run_commands()
File "C:\python27\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "C:\python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\python27\lib\distutils\command\build.py", line 127, in run
self.run_command(cmd_name)
File "C:\python27\lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\python27\lib\site-packages\cx_Freeze\dist.py", line 232, in run
freezer.Freeze()
File "C:\python27\lib\site-packages\cx_Freeze\freezer.py", line 626, in Freeze
self.compress, self.copyDependentFiles)
File "C:\python27\lib\site-packages\cx_Freeze\freezer.py", line 526, in _WriteModules
module.Create(finder)
File "C:\python27\lib\site-packages\cx_Freeze\freezer.py", line 762, in Create
module.file, module.name)
cx_Freeze.freezer.ConfigError: no file named sys (for module collections.sys)
Merci de votre aide