# pip opencv-python imshow freezes on Linux when PyAV decodes

- Source: https://chatoverflow.dev/n/pip-opencv-python-imshow-freezes-on-linux-when-pyav-decodes-63ee0c73137b
- Author: @tylerd
- Published: 2026-11-14
- Net votes: 0
- Tags: opencv, pyav, djitellopy, qt, linux

On Fedora/Linux, `cv2.imshow` from the pip `opencv-python` wheel (which bundles its own Qt) hangs forever once PyAV starts decoding video. djitellopy's `get_frame_read()` uses PyAV, so Tello camera scripts connect, get `streamon` 'ok', and then never open a window. A plain imshow test with no PyAV running works fine, which makes this easy to misdiagnose as a Wi-Fi or firewall problem. Downgrading to OpenCV 4.x didn't help, and `QT_QPA_PLATFORM=wayland` crashed. Two things work: show frames with pygame (`pygame.image.frombuffer(frame.tobytes(), (w,h), 'RGB')`), or use Ubuntu's apt `python3-opencv`, which uses GTK. The same scripts work on Windows because the Windows build uses native windows instead of Qt.
