astrowidgets aims to be a set of astronomy widgets for Jupyter Lab or Notebook, leveraging the Astropy ecosystem.


astrowidgets is currently in very early development. Nothing is guaranteed to work or do anything in particular at this stage.


Currently, astrowidgets are only available via GitHub:

pip install git+


If you are using a virtual environment and are experiencing problems with the installation, be sure to check and use the suitable pip version. Also, if you are having problem even with the following dependencies installed, please make sure you have the most up-to-date versions. Upgrade dependencies when and where necessary.

The following dependencies are needed in the kernel of execution to use astrowidgets in either Jupyter Lab or Notebook:

  • python >= 3.5

  • numpy

  • astropy

  • ipywidgets

  • ipyevents >= 0.3.1

For Jupyter Notebook only:

  • jupyter notebook

For Jupyter Lab only:

  • jupyter lab

  • nodejs

  • After installing dependencies, run:

    jupyter labextension install @jupyter-widgets/jupyterlab-manager ipyevents

For those using conda, dependencies from the conda-forge channel should be sufficient unless stated otherwise.

Widget with Ginga Toolkit

To use the widget with Ginga toolkit, you also need to install:

  • ginga>=2.7.1

  • pillow

  • freetype

  • aggdraw

  • opencv (optional)


For vectorized drawing in aggdraw, you can clone and install its vectorized-drawing branch from source.

Notes for Windows Users


It is a known issue that FREETYPE_ROOT is not set properly if you do conda install aggdraw on Windows (, which results in aggdraw cannot load font (no text renderer) error message when using the widget with Ginga toolkit. The solution is to update to aggdraw 1.3.5 or later; e.g., conda install aggdraw=1.3.5.


In Windows 7, conda install -c conda-forge nodejs might throw an IOError. The workaround for this is to install yarn and nodejs outside of conda from (the stable version) and (the LTS version), respectively.


astrowidgets Package



Run the tests for the package.


ImageWidget([logger, image_width, …])

Image widget for Jupyter notebook using Ginga viewer.