cls*_*udt 9 python jupyter jupyter-notebook jupyter-lab
我注意到交互式小部件在我的 Jupyter Lab 笔记本中不起作用。
以下代码应生成交互式滑块,但不会:
from ipywidgets import interact, interactive, fixed, interact_manual
import ipywidgets as widgets
def f(x):
return x
interact(f, x=10);
Run Code Online (Sandbox Code Playgroud)
这里有什么问题,我怎样才能让小部件工作?
小智 5
您需要安装小部件扩展
pip install ipywidgets
jupyter nbextension enable --py widgetsnbextension --sys-prefix
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7662 次 |
| 最近记录: |