首页 > 解决方案 > jupyter notebook ipywidgets 未显示(无错误)

问题描述

我最近设置了一个新的 Conda 环境并调出了以前工作的代码但是,我发现 Jupyter 小部件似乎无法正常工作

我做了以下事情

conda install -c conda-forge ipywidgets

jupyter nbextension enable --py widgetsnbextension --sys-prefix

谁能告诉我我错过了什么?

from ipywidgets import widgets, Layout, Textarea, IntSlider, RadioButtons
transcripted = widgets.Textarea("hello", layout=Layout(width='100%', display='inline-flex', flex_flow = 'row wrap'))
submit_button = widgets.Button(description="submit")

display(transcripted)
display(submit_button)

结果如下

Textarea(value='hello', layout=Layout(display='inline-flex', flex_flow='row wrap', width='100%'))
Button(description='submit', style=ButtonStyle())

截屏

标签: pythonjupyter-notebookipywidgets

解决方案


回答我自己的问题。

(我不是管理员)我要求管理员停止 jupyter notebook 服务器并重新启动它。

之后它起作用了。


推荐阅读