Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WARNING: Could not load the Qt platform plugin "xcb" in "" even though it was found. #331

Open
zhouzhendiao opened this issue Nov 18, 2024 · 5 comments

Comments

@zhouzhendiao
Copy link

zhouzhendiao commented Nov 18, 2024

Create a conda env:

conda create -y -n napari-env -c conda-forge python=3.9
conda activate napari-env
python -m pip install "napari-spatialdata[all]" "napari[all]" spatialdata_io jupyterlab 
python -m pip install spatialdata_io

I ran napari-spatialdata on docker image or conda env in a server. WARNING: Could not load the Qt platform plugin "xcb" in "" even though it was found. poped out, then the jupyter kernel restarted.

from spatialdata_io import xenium
sdata = xenium(folder)
sdata

output:

SpatialData object
├── Images
│     └── 'morphology_focus': DataTree[cyx] (5, 20658, 48379), (5, 10329, 24189), (5, 5164, 12094), (5, 2582, 6047), (5, 1291, 3023)
├── Labels
│     ├── 'cell_labels': DataTree[yx] (20658, 48379), (10329, 24189), (5164, 12094), (2582, 6047), (1291, 3023)
│     └── 'nucleus_labels': DataTree[yx] (20658, 48379), (10329, 24189), (5164, 12094), (2582, 6047), (1291, 3023)
├── Points
│     └── 'transcripts': DataFrame with shape: (<Delayed>, 13) (3D points)
├── Shapes
│     ├── 'cell_boundaries': GeoDataFrame shape: (203028, 1) (2D shapes)
│     ├── 'cell_circles': GeoDataFrame shape: (203028, 2) (2D shapes)
│     └── 'nucleus_boundaries': GeoDataFrame shape: (199737, 1) (2D shapes)
└── Tables
      └── 'table': AnnData (203028, 5001)
with coordinate systems:
    ▸ 'global', with elements:
        morphology_focus (Images), cell_labels (Labels), nucleus_labels (Labels), transcripts (Points), cell_boundaries (Shapes), cell_circles (Shapes), nucleus_boundaries (Shapes)
from napari_spatialdata import Interactive
interactive = Interactive(sdata)
interactive.run()

output:

WARNING: Could not load the Qt platform plugin "xcb" in "" even though it was found.
WARNING: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

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

Didn't work out after several tries.Is it possible using this napari-spatialdata in linux server and how to?

@melonora
Copy link
Collaborator

There are ways, but they can be difficult to setup, see napari/napari#1457 for example. Do you think you would be able to follow some of the things mentioned here for debugging?

@melonora
Copy link
Collaborator

@zhouzhendiao
Copy link
Author

zhouzhendiao commented Nov 27, 2024

Hi @melonora,

Thanks. It is truly hard to set up on the server. I tried the solutions you mentioned but have not succeeded yet.

It is much easier to install on my laptop(32GB Mem, no GPU). But the performance was pretty bad. The memory was consumed to 100% soon and the run time was very slow for a xenium sample.

We may need a better computer. Any hardware suggestions for running napari-spatialdata?

@melonora
Copy link
Collaborator

hmm could you tell me a little bit more regarding the performance on the xenium example? What particular aspects do you experience as slow?

@zhouzhendiao
Copy link
Author

Hi @melonora ,

Thanks for replying!

The problem is all memories occupied when napari GUI opened. Here is an example:

from spatialdata_io import xenium
sdata = xenium(folder)

This is the data structure:

SpatialData object
├── Images
│     └── 'morphology_focus': DataTree[cyx] (5, 20658, 48379), (5, 10329, 24189), (5, 5164, 12094), (5, 2582, 6047), (5, 1291, 3023)
├── Labels
│     ├── 'cell_labels': DataTree[yx] (20658, 48379), (10329, 24189), (5164, 12094), (2582, 6047), (1291, 3023)
│     └── 'nucleus_labels': DataTree[yx] (20658, 48379), (10329, 24189), (5164, 12094), (2582, 6047), (1291, 3023)
├── Points
│     └── 'transcripts': DataFrame with shape: (<Delayed>, 13) (3D points)
├── Shapes
│     ├── 'cell_boundaries': GeoDataFrame shape: (203028, 1) (2D shapes)
│     ├── 'cell_circles': GeoDataFrame shape: (203028, 2) (2D shapes)
│     └── 'nucleus_boundaries': GeoDataFrame shape: (199737, 1) (2D shapes)
└── Tables
      └── 'table': AnnData (203028, 5001)
with coordinate systems:
    ▸ 'global', with elements:
        morphology_focus (Images), cell_labels (Labels), nucleus_labels (Labels), transcripts (Points), cell_boundaries (Shapes), cell_circles (Shapes), nucleus_boundaries (Shapes)
from napari_spatialdata import Interactive
interactive = Interactive(sdata)
interactive.run()

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants