Installation

Try without installing

You can try out the pywwt Jupyter widget without installing anything locally by using one of our example notebooks, served from the cloud! Visit the pywwt-notebooks repository on GitHub for quick links to the latest examples.

Installing pywwt with pip

You can also install the latest release of pywwt using pip:

pip install pywwt

If you want to use the Qt widget, you will need to install PyQt and PyQtWebEngine, or PySide separately.

If you want to use WWT inside Jupyter Lab, see Using Jupyter Lab.

Using Jupyter Lab

If you want to use the PyWWT widget inside Jupyter Lab, and you haven’t used it or other widgets before in Jupyter Lab, you may need to also run:

jupyter labextension install @jupyter-widgets/jupyterlab-manager

In addition, while Jupyter Lab should offer to do a re-build when it detects a new version of PyWWT, you can also do a build manually with:

jupyter lab build

Dependencies

If you install pywwt using pip or conda as described above, any required dependencies will get installed automatically (with the exception of PyQt/PySide if using pip). For the record, these dependencies are as follows:

In addition, if you want to use the Qt widget, you will need:

For the Jupyter widget, you will need:

Installing the developer version

If you want to use the very latest developer version version, you can clone this repository and install the package manually (note that this requires npm to be installed):

git clone https://github.com/WorldWideTelescope/pywwt.git
cd pywwt
pip install -e .

If you want to use the Jupyter widget, you will also need to run:

jupyter nbextension install --py --symlink --sys-prefix pywwt
jupyter nbextension enable --py --sys-prefix pywwt
jupyter nbextension list  # check that the output shows pywwt as enabled and OK
jupyter serverextension enable --py --sys-prefix pywwt
jupyter serverextension list  # check that the output shows pywwt as enabled and OK

And if you additionally want to use the widget in JupyterLab, run:

jupyter labextension install .
jupyter labextension list  # check that the output shows pywwt as enabled and OK

Besides pywwt, the @jupyter-widgets/jupyterlab-manager and ipyevents lab-extensions must be installed and enabled.

If you use conda, you can alternatively install a recent developer version using:

conda install -c conda-forge -c wwt/label/dev pywwt

This will install a version built in the last 24 hours so may not strictly be the absolute latest version in some cases.