Using pip

pip install ipyd3
jupyter nbextension enable --py --sys-prefix ipyd3  # can be skipped for notebook 5.3 and above

JupyterLab extension

If you have JupyterLab, you will also need to install the JupyterLab extension:

jupyter labextension install ipyd3

Development installation

For a development installation (requires npm):

git clone https://gitlab.com/teia_engineering/ipyd3.git
cd ipyd3
pip install -e .
jupyter nbextension install --py --symlink --sys-prefix ipyd3
jupyter nbextension enable --py --sys-prefix ipyd3
jupyter labextension install ipyd3 # If you are developing on JupyterLab

For automatically building the JavaScript code every time there is a change, run the following command from the ipyleaflet/js/ directory:

npm run watch

If you are on JupyterLab you also need to run the following in a separate terminal:

jupyter lab --watch

Every time a JavaScript build has terminated you need to refresh the Notebook page in order to load the JavaScript code again.