[Python] QSocketNotifier Error on OpenCV program in Python on Ubuntu 24.04

Discussão em 'Python' iniciado por Stack, Abril 8, 2025.

  1. Stack

    Stack Membro Participativo

    This is my python code in VS Code. I recently dual-booted Ubuntu 24.04 on my laptop.

    import cv2 as cv

    img = cv.imread("starry_night.jpg")

    cv.imshow("Display window", img)

    cv.waitKey(0)


    The error that I get verbatim is the following;

    QSocketNotifier: Can only be used with threads started with QThread
    /bin/python3: symbol lookup error: /snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0: undefined symbol: __libc_pthread_init, version GLIBC_PRIVATE


    I was expecting it to display a window with my image but it shows that error. I tried reading about it but everything I see is about Fedora having a problem or something to do with me changing from Gnome with Wayland to Gnome with Xorg. I don't know how to do that, neither do I know what those are.

    I would appreciate all help.

    Continue reading...

Compartilhe esta Página