Bonjour à tous,
J'ai écrit un programme en Python pour redimensionner des photos.
Ce programme utilise les modules wx, os, sys, glob, string, Image.

J'ai tenté de compiler le programme avec py2exe, mais ça n'a pas fonctionné.

Mon setup.py:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
from distutils.core import setup 
import py2exe
 
setup(windows=["App1.py"])
Ce que j'obtiens sur ma console:
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
D:\Python24>python.exe setup.py py2exe
running py2exe
*** searching for required modules ***
*** parsing results ***
creating python loader for extension 'wx._misc_'
creating python loader for extension 'zlib'
creating python loader for extension '_imaging'
creating python loader for extension 'unicodedata'
creating python loader for extension 'wx._windows_'
creating python loader for extension 'wx._gdi_'
creating python loader for extension 'bz2'
creating python loader for extension 'wx._controls_'
creating python loader for extension 'wx._core_'
*** finding dlls needed ***
Traceback (most recent call last):
  File "setup.py", line 5, in ?
    setup(windows=["App1.py"])
  File "D:\Python24\lib\distutils\core.py", line 149, in setup
    dist.run_commands()
  File "D:\Python24\lib\distutils\dist.py", line 946, in run_commands
    self.run_command(cmd)
  File "D:\Python24\lib\distutils\dist.py", line 966, in run_command
    cmd_obj.run()
  File "D:\Python24\Lib\site-packages\py2exe\build_exe.py", line 218, in run
    self._run()
  File "D:\Python24\Lib\site-packages\py2exe\build_exe.py", line 278, in _run
    dlls = self.find_dlls(extensions)
  File "D:\Python24\Lib\site-packages\py2exe\build_exe.py", line 362, in find_dl
ls
    self.dll_excludes)
  File "D:\Python24\Lib\site-packages\py2exe\build_exe.py", line 950, in find_de
pendend_dlls
    alldlls, warnings, other_depends = \
  File "D:\Python24\Lib\site-packages\py2exe\build_exe.py", line 1313, in bin_de
pends
    for result in py2exe_util.depends(image, loadpath).items():
py2exe_util.bind_error: (2, 'Le fichier sp\xe9cifi\xe9 est introuvable', 'D:\\Py
thon24\\lib\\site-packages\\py2exe\\run_w.exe')
Voilà, je pense que c'est du à la librairie PIL, je ne sais pas trop, je suis bien perdu sur ce coup là...
Merci d'avance à tous pour vos conseils et vos réponses, bonne soirée!