Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipywidgets don't seem to work on mybinder.org #840

Closed
sg-s opened this issue May 3, 2019 · 4 comments
Closed

ipywidgets don't seem to work on mybinder.org #840

sg-s opened this issue May 3, 2019 · 4 comments

Comments

@sg-s
Copy link

sg-s commented May 3, 2019

I have a python notebook [here])https://github.com/sg-s/rent-or-buy) that uses ipywidgets to enable interactivity.

However, on binder, the notebook renders without any errors, but the widgets seem "dead", and don't update plots.

Link to binder live notebook

  • Is this expected behaviour?
  • Can ipywidgets be used on binder?
  • If not, what tools exist for interactivity on binder?

Thanks in advance

@betatim
Copy link
Member

betatim commented May 3, 2019

Hi!

widgets should work. If I launch https://github.com/binder-examples/requirements I can paste the following simple widget code:

import ipywidgets as widgets
widgets.IntSlider()

and get a slider that slides.

TL;DR: It should just work.


As a general comment: for support questions like this (discussions that aren't about making changes to the binderhub repo itself) it is better to create a thread on http://discourse.jupyter.org/ as it has more readers and is indexed by google so future readers will have an easier time finding similar issues/solutions.

@betatim
Copy link
Member

betatim commented May 3, 2019

If I replace %matplotlib notebook with %matplotlib inline in your notebook I get a plot in your notebook. So maybe this is a question of how to configure matplotlib (figures)?

@sg-s
Copy link
Author

sg-s commented May 3, 2019

HI, I should have been more clear.

The sliders do render in my notebook, as do the plots. But moving the sliders doesn't update the plot.

@sg-s
Copy link
Author

sg-s commented May 3, 2019

OK, I fixed the problem as I was missing a plt.show()

thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants