Skip to content

How to use in Google Colab? #150

@ziw-liu

Description

@ziw-liu

How can I use this in Google Colab notebooks? I tried to follow the Jupyter example:

!pip install "ndv[jup]"
import ndv

data = ndv.data.cells3d()
ndv.imshow(data)

and got an error:

---------------------------------------------------------------------------

RuntimeError                              Traceback (most recent call last)

[<ipython-input-2-2c8bdd59b309>](https://localhost:8080/#) in <cell line: 0>()
      2 
      3 data = ndv.data.cells3d()
----> 4 ndv.imshow(data)

3 frames

[/usr/local/lib/python3.11/dist-packages/ndv/views/_app.py](https://localhost:8080/#) in ndv_app()
    210             errors.append((key, e))
    211 
--> 212     raise RuntimeError(  # pragma: no cover
    213         f"Could not find an appropriate GUI frontend: {valid!r}. Tried:\n\n"
    214         + "\n".join(f"- {key}: {err}" for key, err in errors)

RuntimeError: Could not find an appropriate GUI frontend: {'jupyter', 'wx', 'qt'}. Tried:

- GuiFrontend.QT: No module named 'qtpy'
- GuiFrontend.WX: No module named 'wx'
- GuiFrontend.JUPYTER: Jupyter is not running a notebook shell.  Cannot create app.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions