mmdetection运行测试代码时报错This application failed to start because it could not find or load the Qt platfo

(python3.6) xxx@OMEN:~/project/mmdetection-master$ python tools/test.py configs/mask_rcnn/mask_rcnn_r50_fpn_1x_coco.py work_dirs/mask_rcnn_r50_fpn_1x_coco/epoch_12.pth --show-dir work_dirs/result --eval segm
loading annotations into memory...
Done (t=0.00s)
creating index...
index created!
Use load_from_local loader
[                                                  ] 0/6, elapsed: 0s, ETA:This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "/home/xxx/.local/lib/python3.6/site-packages/cv2/qt/plugins".

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Reinstalling the application may fix this problem.
已放弃 (核心已转储)

原因:qt5版本太低,需要升级

#查看qt5当前版本
pip show pyqt5
#查看qt5的所有版本
(python3.6) xxx@OMEN:~/project/mmdetection-master$ pip install pyqt5==
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
ERROR: Could not find a version that satisfies the requirement pyqt5== (from versions: 5.7.1, 5.8, 5.8.1.1, 5.8.2, 5.9, 5.9.1, 5.9.2, 5.10, 5.10.1, 5.11.2, 5.11.3, 5.12, 5.12.1, 5.12.2, 5.12.3, 5.13.0, 5.13.1, 5.13.2, 5.14.0, 5.14.1, 5.14.2, 5.15.0, 5.15.1, 5.15.2, 5.15.3, 5.15.4)                                   
ERROR: No matching distribution found for pyqt5==
WARNING: You are using pip version 21.1.2; however, version 21.1.3 is available.
You should consider upgrading via the '/home/xxx/anaconda3/envs/python3.6/bin/python -m pip install --upgrade pip' command.
#将qt5升级到最新版本
pip install pyqt5==5.15.4

重新运行测试程序,解决

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值