qt.qpa.xcb: could not connect to display loacalhost:10.0
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/UserDirectory/zhegezs/miniconda3/envs/detectron2/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.
安装qt5
pip install PyQt5 -i https://pypi.douban.com/simple
用到的工具:
MobaXterm
Unix-compatible keyboard不可以选
输入命令:
echo $DISPLAY
pycharm
Run选项卡–>edit configuation–>environment–>添加变量:
DISPLAY ,localhost:10.0
成功!