在Jupyter Notebook中,ipywidgets运行良好,但它们似乎在Jupyter Lab中不起作用(据说它比Notebook更好).
我遵循了这些指示.
第1步:安装Node.js(https://nodejs.org/en/)
第2步:使用conda在Python 3上安装了需求:
conda install -c conda-forge ipywidgets
jupyter labextension install @jupyter-widgets/jupyterlab-manager
Run Code Online (Sandbox Code Playgroud)
不幸的是,基本的小部件在jupyter实验室笔记本中不起作用:
在 Jupyter 笔记本中,我想制作一个带有两个控制点的交互式滑块。使用单个控件很容易做到这一点,请参见此示例:
但这是我真正想要的一个例子,它被称为间隔滑块(Mathematica 做得很好):
这可能与ipywidgets或其他一些 python 包有关吗?