【发布时间】:2021-01-12 17:31:08
【问题描述】:
所以这是它在cmd windows 10中抛出的错误。似乎与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
非常感谢
【问题讨论】:
-
如果pynput 1.6.8版本有你需要的功能,请尝试使用pynput==1.6.8
-
这个命令是否可以通过 cmd 与 pyinstaller 一起使用?谢谢
-
您使用哪个命令制作您的应用程序?
-
我只是在powershell中运行pyinstaller file.exe
-
好的,尝试运行
pyinstaller --hidden-import=pynput==1.6.8; file.py
标签: python pyinstaller pynput