python - 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())
解决方案
回答我自己的问题。
(我不是管理员)我要求管理员停止 jupyter notebook 服务器并重新启动它。
之后它起作用了。
推荐阅读
- reactjs - TypeError:SpeechRecognition 不是构造函数
- passwords - 设置私人 MediaWiki
- php - 什么是':'在php中
- xml - Apache Freemarker - 获取重复节点以及子节点
- laravel - Laravel:在护照中使用多列进行身份验证
- sql - dbGetQuery 在命令中不将用户识别为数据库,而是将其识别为一些系统变量
- javascript - 如何在 JavaScript 中解析 JSON?
- python - 无法使用 python django 启动测试服务器
- amazon-web-services - 在 AWS 中,如何将 API 密钥添加到我的 API?
- scala - sbt "runMain com.... arg1" 调用 `packageBin`