Interactive Jupyter Widgets not working in Jupyter Lab

后端 未结 2 1718
忘掉有多难
忘掉有多难 2021-01-12 08:14

I noticed that interactive widgets are not working in my Jupyter Lab notebooks.

The following code should produce an interactive slider but doesn\'t:



        
相关标签:
2条回答
  • 2021-01-12 09:03

    You need to install widget extension

    pip install ipywidgets
    jupyter nbextension enable --py widgetsnbextension --sys-prefix
    
    0 讨论(0)
  • 2021-01-12 09:14

    Per the docs:

    To install the JupyterLab extension you also need to run the command below in a terminal which requires that you have nodejs installed.

    jupyter labextension install @jupyter-widgets/jupyterlab-manager
    

    I think it's the latter nodejs requirement that you are missing e.g. with Conda, first run:

    conda install nodejs
    
    0 讨论(0)
提交回复
热议问题