JupyterLab 3.0+
-
Install
jupyterlabandipympl.For
pipusers:pip install --upgrade jupyterlab ipymplFor
condausers:conda update -c conda-forge jupyterlab ipympl -
Restart JupyterLab.
-
Decorate the cell containing plotting code with the header:
%matplotlib widget # plotting code goes here
JupyterLab 2.0
-
Install
nodejs, e.g.conda install -c conda-forge nodejs. -
Install
ipympl, e.g.conda install -c conda-forge ipympl. -
[Optional, but recommended.] Update JupyterLab, e.g.
conda update -c conda-forge jupyterlab==2.2.9==py_0. -
[Optional, but recommended.] For a local user installation, run:
export JUPYTERLAB_DIR="$HOME/.local/share/jupyter/lab". -
Install extensions:
jupyter labextension install @jupyter-widgets/jupyterlab-manager jupyter labextension install jupyter-matplotlib -
Enable widgets:
jupyter nbextension enable --py widgetsnbextension. -
Restart JupyterLab.
-
Decorate with
%matplotlib widget.