环境:pycharm ubuntu linux 远程开发环境
报错:
Failed to connect to Mir: Failed to connect to server socket: No such file or directory
Unable to init server: Could not connect: Connection refused
(frame:25170): Gtk-WARNING **: cannot open display:
Process finished with exit code 1
原因:
你的代码中可能使用了cv2.imshow等类似的需要调用图形界面显示的
但是因为是在远程服务器上运行,可能不支持显示图形界面。去掉即可