Python-basierter Exe-Fehler beim CMD (Pynput-Modul)

Sep 26 2020

Das ist also der Fehler, den es in cmd Windows 10 auslöst. Scheint etwas mit Pynput zu tun zu haben? Ich bin mir nicht sicher, was ich tun kann, um dieses Problem zu beheben, und freue mich über jede Hilfe.

C:\Users\Michael\Desktop\herprogram\dist\beeb>beeb.exe
Traceback (most recent call last):
  File "C:\Users\Michael\Desktop\herprogram\beeb.py", line 5, in <module>
    import pynput
  File "c:\python38\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 493, in exec_module
    exec(bytecode, module.__dict__)
  File "pynput\__init__.py", line 40, in <module>
  File "c:\python38\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 493, in exec_module
    exec(bytecode, module.__dict__)
  File "pynput\keyboard\__init__.py", line 31, in <module>
  File "pynput\_util\__init__.py", line 76, in backend
ImportError
[11880] Failed to execute script beeb

Danke vielmals

Antworten

Hydra17 Sep 29 2020 at 22:36

Ich habe zu einem anderen Modul pywinauto gewechselt, das offiziell von pyinstaller unterstützt wird und verwendet:

import pywinauto
pywinauto.mouse.double_click(button='left', coords=(0, 0))

Dies löste das Problem. Danke Leute