我想要在窗口上创建一个码头映像,而坞文件中的图像库则是linux操作系统。我的程序使用了open程序,它的输出图像必须用CV2.imshow()
显示。但是在运行容器之后,我得到了这个错误。
请帮我修一下。
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/usr/local/lib/python3.9/site-packages/cv2/qt/plugins" 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: xcb.
发布于 2022-07-06 11:40:46
我也有过这个问题。最终成功的一个解决方案是安装opencv的早期版本。我最初安装的版本是4.6.0.66。我在docker中卸载了opencv pip uninstall opencv-python
,并在dockerfile中重新安装了RUN pip install opencv-python==4.1.2.30
。
https://stackoverflow.com/questions/70273196
复制相似问题