首页 > 解决方案 > jupyter notebook Linux ipywidgets不工作

问题描述

    import ipywidgets as widgets
from IPython.display import display
w = widgets.Dropdown(
    options={'Pen': 7732, 'Pencil': 102, 'Pad': 33331},
    description='Item:',
)
display(w)
#w.value

结果:Dropdown(description='Item:', options={'Pen': 7732, 'Pencil': 102, 'Pad': 33331}, value=7732)

这不是下拉

嗨,我在虚拟环境中的 linux jupyter notebook 中工作

我已经尝试从这里 Jupyter 小部件没有出现在笔记本中

交互式 Jupyter 小部件在 Jupyter Lab 中不起作用

任何想法?

更新我在其他 CELL 中添加的其他库:

from elasticsearch import Elasticsearch
import json
import pandas as pd 
from pandas.io.json import json_normalize
import matplotlib.pyplot as plt
%matplotlib inline

标签: pythonjupyter-notebook

解决方案


推荐阅读