Question: 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](https://i.stack.imgur.com/veoyT.png) (the error is definitely connected to pyqt5).
I have found many posts that suggest to:

1. Go to => Python38>lib>site-packages>PyQt5>Qt>plugins
2. In plugins copy platforms folder
3. After that go to Python38>lib>site-packages>PyQt5\_tools>Qt>bin
4. 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?

Answer: 
Someone suggested to run "xhost +local:" first.
In my specific case the issue is caused by the WSL, that has no access to the graphic part of the computer. I performed a dual boot on my computer in order to proceed, because I could not find a way to solve the issue.