I am working on Ubuntu 18.04 (as a Windows 10 subsystem for linux). When I try running code that uses pyqt5 it throws the error:
" qt.qta.xcb: could not connect to display
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, xcb.
Aborted "
as in the image image of error message (the error is definitely connected to pyqt5). I have found many posts that suggest to:
- Go to => Python38>lib>site-packages>PyQt5>Qt>plugins
- In plugins copy platforms folder
- After that go to Python38>lib>site-packages>PyQt5_tools>Qt>bin
- paste folder here. Do copy and replace.
but it seems like there is no Qt folder in pyqt5_tools on my computer. I have removed and installed back pyqt5, pyqt5-tools, pyqt5-plugins several times but it does not work. Can it be connected to the fact that I am using a subsystem? (I have downloaded pyqt5 both on Windows and on Ubuntu). Any suggestions to solve this problem?