Module manquant pynput avec cx_freeze
Bonjour,
j'essaie de rendre exécutable un code avec pynput. Le code est le suivant (compiltest.py) :
Code:
1 2 3 4
| import os
import pynput.keyboard as kb
print("Salut le monde !")
os.system("pause") |
En lançant l'executable la fenêtre s'ouvre et se referme immédiatement. Si je supprime la ligne "import pynput.keyboard as kb", ça fonctionne.
Je freeze avec cx_freeze :
Code:
1 2 3 4 5 6 7 8 9 10 11 12
| from cx_Freeze import setup, Executable
build_exe_options = {'packages': ["os", "pynput"],
'excludes': [],
'includes': [ "os", "pynput"],
'include_files': [ "os", "pynput"]
}
setup(name = "test",version = "1",\
description = "test",\
executables = [Executable("compiltest.py")],) |
et il manque des modules pendant la création du package :
Citation:
Missing modules:
? AppKit imported from pynput.mouse._darwin
? CoreFoundation imported from pynput._util.darwin
? Quartz imported from pynput._util.darwin, pynput.keyboard._darwin, pynput.mouse._darwin
? StringIO imported from six
? Xlib.X imported from pynput.keyboard._xorg, pynput.mouse._xorg
? Xlib.XK imported from pynput._util.xorg, pynput.keyboard._xorg
? Xlib.display imported from pynput._util.xorg, pynput.keyboard._xorg, pynput.mouse._xorg
? Xlib.ext imported from pynput.keyboard._xorg, pynput.mouse._xorg
? Xlib.ext.xtest imported from pynput.keyboard._xorg, pynput.mouse._xorg
? Xlib.keysymdef.xkb imported from pynput.keyboard._xorg
? Xlib.protocol imported from pynput.keyboard._xorg, pynput.mouse._xorg
? Xlib.threaded imported from pynput._util.xorg
A priori tout est à jour, cx_freeze, pynput, python 3.7.3
Je débute, par sûr d'être tombé sur les bons forums ou mots clés.
Un peu d'aide serait super ! merci :lol: