--I was addicted to converting a GUI application using PyQt5 into a Windows EXE with PyInstaller. --By specifying the PyQt path at build time, the build will pass
I was creating a GUI application using PyQt5. The application analyzes the file dragged and dropped into the window and outputs the file in Excel format. When I used PyInstaller to make it into an EXE for distribution, the build succeeded but it could not be executed.
The run-time error message is *** failed to execute script pyi_rth_qt5plugins ***
About the environment
Set the PyQt path when running pyinstaller
.
Example
pyinstaller simple_tool.py --onefile --noconsole -p "C:\Users\User name\AppData\Local\Programs\Python\Python35-32\Lib\site-packages\PyQt5\Qt\bin"
Specify the directory of PyQt library files under site-packages with -p
.
The directory where Python is installed depends on the environment, so refer to it as appropriate.