Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pyinstaller & Keyboard

I'm stuck on a problem. I'm exporting code to .exe with pyinstaller. Code includes tkinter, PIL and keyboard modules. Software runs perfectly on my PC with Python, whereas on the one without Python it crashes whenever I use something linked to keyboard.

Therefore, I concluded that keyboard module wasn't included properly when "converting" to .exe.

I've tried including it with adding --hidden-import=keyboard in the script, but it also doesn't seem to work.

Have You got any idea, how to possibly solve this and include that module into output?

like image 475
TheOne Avatar asked Nov 01 '25 04:11

TheOne


1 Answers

I had the same problem my Solution was to use the -p [Path] argument:

pyinstaller Proc.py -p "C:\Users\New\Desktop\Project\virtualenv\Lib\site-packages"

in the "Lib\site-packages" was the Keyboard module installation.

like image 95
Tomke Avatar answered Nov 03 '25 18:11

Tomke



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!