IPython Notebook ipywidgets不显示 [英] IPython Notebook ipywidgets does not show

查看:350
本文介绍了IPython Notebook ipywidgets不显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个带有交互式滑块的表格,该滑块使我可以在表格的不同时间段之间进行切换.过去几天一直在工作,直到今天,当我重新运行笔记本电脑时,滑动条不再显示.没有错误消息出现.如表所示,该代码似乎运行良好,但没有显示滑动条.我也没有更改代码,因为我正在笔记本的另一部分上工作.

I created a table with an interactive slider that allows me to toggle between different periods on my table. It was working for the past few days, until today, when I re-ran the notebook, the slide bar doesn't show anymore. No error messages appear. The code seem to run just fine, as the table appears, but the slide bar just doesn't appear. I didn't change my code either, as I was working on a separate part of my notebook.

我尝试了许多方法,包括在此空间中进行搜索,但仍然无法提出解决方案.我想知道是否有人遇到类似的问题,并且对此有任何解决方案.

I tried many approaches, including searching in this space but was still unable to come up with a solution. I was wondering if anyone faced a similar issue, and have any solution to this.

下面是我的代码段.以前所做的一切仅仅是为了将我的数据转换成所需的表格格式.

Below is my code snippet. Anything before was solely to get my data into the desired form for tabulation.

from IPython.display import display
from ipywidgets import widgets, interactive
v = interactive(by_q, quarter=(['q1y2015', 'q2y2015', 'q3y2015', 'q4y2015']), days=(1, 180))
display(v)

推荐答案

使用新版本的ipywidgets,我遇到了这个问题,但是后来我在

With the new version of ipywidgets, I ran into this problem, but then I found on their github readme that you now need to follow

pip install ipywidgets

jupyter nbextension enable --py widgetsnbextension

那为我解决了这个问题.

That cleared the problem up for me.

这篇关于IPython Notebook ipywidgets不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆