ฉันกำลังเรียนรู้การสร้าง GUI สำหรับ python บน PyQt5 ฉันมีโปรแกรมที่แสดงเว็บแคมพร้อมการตรวจจับใบหน้าบน GUI พร้อมฟังก์ชันเริ่มและหยุดโดยใช้ opencv และ pyqt5 แต่เกิดข้อผิดพลาดต่อไปนี้ -
mayank@beware-hoax:~/PythonProjects/gui/pyqt5/pyqt5_face_detection$ source /home/mayank/anaconda3/bin/activate
conda activate gui
(base) mayank@beware-hoax:~/PythonProjects/gui/pyqt5/pyqt5_face_detection$ conda activate gui
/home/mayank/anaconda3/envs/gui/bin/python /home/mayank/PythonProjects/gui/pyqt5/pyqt5_face_detection/main_window.py
(gui) mayank@beware-hoax:~/PythonProjects/gui/pyqt5/pyqt5_face_detection$ /home/mayank/anaconda3/envs/gui/bin/python /home/mayank/PythonProjects/gui/pyqt5/pyqt5_face_detection/main_window.py
qt.qpa.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, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
Aborted (core dumped)
export QT_DEBUG_PLUGINS=1
และรันสคริปต์ของคุณอีกครั้ง คุณได้รับข้อความอะไรในกรณีนี้? - person eyllanesc   schedule 04.02.2020