How Qt platform plugin could be initialized in Google Colab?

Viewed 630

I got the following error while using Google Colab:

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

Please help me find a replacement for qt?

2 Answers

Having the same problem, and I think I found the answer. Basically not possible to run QT on the cloud!

"QT is a GUI library that can run only on your local machine. You cannot run it in the cloud and then let it open a QT window on your machine. You may need to find another labeling library that use web-interface instead."

check this out:

Could not connect to any X display: Google Colab Run-time

Actually you could make it work with the right platform plugin. By passing for example -platform vnc to your application you should be able to start it in "headless mode". (actually your GUI is drawn to a VNC server you can connect to)

Your error is caused by the absence of a window manager, the xcb platform is trying to access.

Related