这就是它在cmd windows10中抛出的错误。似乎与pynput有关?我真的不确定我能做些什么来修复这个问题,并感谢任何帮助。
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
非常感谢
发布于 2020-09-29 22:36:32
我切换到了一个不同的模块pywinauto,它是由pyinstaller官方支持的,并使用:
import pywinauto
pywinauto.mouse.double_click(button='left', coords=(0, 0))
这就解决了问题。谢谢你们
https://stackoverflow.com/questions/64080051
复制相似问题