My PyInstaller spec:
# -*- mode: python -*-
block_cipher = None
a = Analysis([\'test.py\'],
pathex=[\'C:\\\\Users\\\\admin\\\\compile\'],
I had an issue where my python code worked fine, but the compiled .exe file would provide the "could not find or load the Qt platform plugin windows" problem. I fixed the problem by copying the ~PyQt5\Qt\plugins\platforms
folder from the program's directory, generated by using pyinstaller --onedir main.py
, to the folder holding the .exe file.
It seems that in my case the only way "helping" my program detect the required .dlls was having the platforms
folder next to the main.exe
. Pasting the platforms
folder to the program's directory after using pyinstaller --onefile main.py
also makes the program work.