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

查看:45
本文介绍了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,我遇到了这个问题,但是后来我在你现在需要遵循的他们的 github 自述文件

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

这为我解决了问题.

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

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