Python pyqt5 application cant be work as executable file

Viewed 27

I am trying to build a windows application using Pyqt5. I built the UI using QT Designer and its compatible with the python file. Also, I can run my app perfectly through pycharm.

My problem is when I used pyinstaller to create exe file to my app, it didn't work at all. As well as the generated file does not has exe extension. I tried to run this generated file through the terminal by type ./main but unfortunately, it gave me:

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

The used command to create exe file is: pyinstaller --onefile -w main.py

0 Answers
Related