Im trying to convert a single file python script/project into an exe using pyinstaller
Even thought pyinstaller converts the script the .exe will run and throw this
Traceback (most recent call last): File "main.py", line 4, in <module> File "PyInstaller\loader\pyimod03_importers.py", line 540, in exec_module File "pynput\__init__.py", line 40, in <module> File "PyInstaller\loader\pyimod03_importers.py", line 540, in exec_module File "pynput\keyboard\__init__.py", line 31, in <module> File "pynput\_util\__init__.py", line 76, in backend ImportError [16676] Failed to execute script main I'm stumped , through my trial and erroring i figured that when i replace pynput with a module like random
the convertion works fine , but i need it to work with pynput
please help , thanks in advance!
pyinstaller --onefile --windowed my_app.pyseems like it did not import all the modules.pyinstaller my_app.py -Fi also tried to do thispyinstaller my_app.py -F --hiddenimport=pynput.and thispyinstaller my_app.py -F -p C:\pathToVenv\Lib\site-packagesby the way if that helps this is a pycharm project