【问题标题】:Google Colab error: Could not load the Qt platform plugin "xcb"Google Colab 错误:无法加载 Qt 平台插件“xcb”
【发布时间】:2020-09-29 05:40:30
【问题描述】:

我正在尝试在 google colab 上运行此命令

!python /content/yolov4-custom-functions/detect_video.py --weights ./checkpoints/yolov4-416 --size 416 --model yolov4 --video /content/yolov4-custom-functions/data/video/video.mp4 --output /content/yolov4-custom-functions/detections/results.avi

运行此程序时,我收到此错误..

qt.qpa.xcb: could not connect to display 
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/usr/local/lib/python3.8/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, minimal, offscreen.

Fatal Python error: Aborted

Current thread 0x00007f3ea147f780 (most recent call first):
  File "/content/yolov4-custom-functions/detect_video.py", line 165 in main
  File "/usr/local/lib/python3.8/site-packages/absl/app.py", line 251 in _run_main
  File "/usr/local/lib/python3.8/site-packages/absl/app.py", line 300 in run
  File "/content/yolov4-custom-functions/detect_video.py", line 178 in <module>

我尝试重新安装并寻找其他答案,但似乎都没有为 colab 解决这个问题。

请帮帮我。

【问题讨论】:

    标签: python plugins google-colaboratory


    【解决方案1】:

    查看 cv2.imshow() 函数,因为 Google Colab 不允许使用 GUI,所以在此处启动图像时可能会出错。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-08-06
      • 2016-01-08
      • 2013-07-23
      • 2022-06-23
      • 2020-05-05
      • 1970-01-01
      • 2020-10-05
      • 2019-10-09
      相关资源
      最近更新 更多