Seaborn's interactive choose_colorbrewer_palette
tool requires ipywidgets
(or IPython.html.widgets
). In order to be able to use those widgets in jupyter you need to activate them
jupyter nbextension enable --py widgetsnbextension
For use in jupyter lab you also need to install the JupyterLab Extension
jupyter labextension install @jupyter-widgets/jupyterlab-manager
This requires nodejs
to be installed.
So a complete install in conda may look like
> conda install seaborn juypter jupyterlab ipywidgets nodejs
> jupyter nbextension enable --py widgetsnbextension
> jupyter labextension install @jupyter-widgets/jupyterlab-manager
The starting jupyter lab
> juypter lab
and typing in the code from the question works as expected.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.