royerlab / napari-segment-anything

Segment Anything Model (SAM) native Qt UI
Apache License 2.0
190 stars 17 forks source link

napari error: Could not load the Qt platform plugin "xcb" in "" even though it was found. - cannot connect to display #17

Open maryamkqamar opened 1 year ago

maryamkqamar commented 1 year ago

Hi thanks for the interesting project, I am running this from my local computer connected to a remote server. When I try to run napari, it gives the error: Could not load the Qt platform plugin "xcb" in "" even though it was found. and when in debug says cannot connect to display. I tried with both pyqt5 and pyside2. I also tried solutions https://forum.image.sc/t/cant-open-napari-with-jupyter-and-vs-code-module-napari-has-no-attribute-viewer-runtimeerror-no-qt-app-has-been-created/71353/3, https://github.com/NVlabs/instant-ngp/discussions/300 and more but could not resolve it yet. Could you please help about this. Thank you.

JoOkuma commented 1 year ago

Hey @maryamkqamar , sorry for the late response.

How is your remote server setup?

Napari cannot be run remotely, you could try using X11 forwarding with ssh but it will require running this on the server and forwarding it to your local computer. Performance won't be great and you need to make sure your remote server has X11.

If you can only run it in a server the ideal solution is to setup a virtual desktop there and access it remotely.

I hope this can help you.