I ran into the same problem. I tried to read the image from IDLE and tried to display it using cv2.imshow() , but the viewport freezes and shows that pythonw.exe not responding when trying to close the window.
The message below provides a possible explanation of why this is happening.
pythonw.exe is not responding
"In principle, do not do this from IDLE. Write a script and run it from a shell or script directly if on Windows, calling it the extension .pyw and double-clicking on it. There seems to be a conflict between the IDLE's own event loop and graphical tools GUI interfaces.
When I used imshow() in a script and ran it, rather than running it directly through IDLE, it worked.
rkdasari Jun 11 2018-12-14T00: 00Z
source share