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

Add Ipywidgets support #60

Closed
joseFranciscoDiez opened this issue Feb 14, 2018 · 71 comments
Closed

Add Ipywidgets support #60

joseFranciscoDiez opened this issue Feb 14, 2018 · 71 comments

Comments

@joseFranciscoDiez
Copy link

Widgets are the most widespread way to provide interactivity with the user in Jupyter notebooks.

Google Colab should support ipywidgets or provide an alternative.

Ref https://stackoverflow.com/questions/47269168/ipywidgets-with-google-colaboratory

@joseFranciscoDiez joseFranciscoDiez changed the title Add Ipywidgets plugin support Add Ipywidgets support Feb 14, 2018
@blois
Copy link
Contributor

blois commented Mar 8, 2018

Also see #6

@KelSolaar
Copy link

Hi,

As many I'm super interested by that feature support and wanted to know if there was any news about it?

Cheers,

Thomas

@blois
Copy link
Contributor

blois commented May 29, 2018

Are there specific widgets or scenarios that you are interested in?

@KelSolaar
Copy link

@blois : Yes absolutely :)

Here is a typical example I would be keen on running in Google Colab:

image

Widgets used: Box, Dropdown, HBox, IntSlider, Label, Textarea, VBox

You can play live with it in Binder if you can bear with the slow startup time (just need to execute the cells): https://mybinder.org/v2/gh/colour-science/colour-playground/master?filepath=playground%2Fcolour.ipynb

@chengs
Copy link

chengs commented Jun 1, 2018

@blois, also, some tqdm (a progress bar) users need to run the tqdm on CoLab, which needs ipywidgets to work.
REF tqdm/tqdm#558

@rocha
Copy link

rocha commented Jun 10, 2018

@blois support for ipyvolume or any other interactive 3d plot widget would be great!

@mdmadhu
Copy link

mdmadhu commented Jul 5, 2018

@blois, ipyleaflet is another widget that would be very useful to see in Colab. Colab notebooks would be a great way forward for Python users of Google Earth Engine to collaborate, and here, ipyleaflet in Jupyter notebooks is currently among the recommended/favoured options for visualising tiled maps created from analyses. There are workarounds, but support for ipywidgets would be great. Thanks.

@KelSolaar
Copy link

Adding pythreejs to the bunch!

@maartenbreddels
Copy link

As a core jupyter-widgets / ipywidget dev I want to let you know we are interested in support on colab. Feel free to reach out to us for help or discussion in care you need help:

cc @jasongrout @SylvainCorlay @vidartf @mwcraig

@Yomguithereal
Copy link

Adding ipysigma to the bunch.

@tovrstra
Copy link

tovrstra commented Oct 8, 2018

Some more:

@mwcraig
Copy link

mwcraig commented Oct 8, 2018

I'd also like to see ipyevents in the mix...I am a little biased, though, since I wrote it. But including ipyevents would also allow astrowidgets.

@thewtex
Copy link

thewtex commented Oct 26, 2018

Adding itk-jupyter-widgets, interactive Jupyter widgets to visualize images in 2D and 3D, as another example in the vibrant ipywidgets ecosystem that would be helpful for colab adoption.

@perez1987
Copy link

+1

@maallen3
Copy link

I need this too!

@DuaneNielsen
Copy link

I'd just like tqdm progress bars to work nicely, that would be good...

@d13g0
Copy link

d13g0 commented Nov 23, 2018

Me too!

@diego898
Copy link

Another vote for supporting tqdm!

@chengs
Copy link

chengs commented Nov 28, 2018

@diego888
See this tqdm/tqdm#640

If need to use tqdm on colab immediately.

Or you can wait until it is merged into master.

@smilinrobin
Copy link

+1
Need this :)

@wesuga
Copy link

wesuga commented Jan 3, 2019

+1

@chrisbol
Copy link

+1, would be great if Slider, Checkbox, Combo, Select widgets will become available

@blois
Copy link
Contributor

blois commented Jun 1, 2020

Opened #1302

@barissayil
Copy link

I'd like to be able to use tqdm on colab as well.

@blois
Copy link
Contributor

blois commented Jul 5, 2020

@adriangb
Copy link

It would be amazing to get support for third party widgets!

@omar-3
Copy link

omar-3 commented Aug 29, 2020

is there any hope for ipyleaflet to be included?

@jph00
Copy link

jph00 commented Sep 19, 2020

@blois it appears this has been implemented now - should this issue be closed?

@blois
Copy link
Contributor

blois commented Sep 19, 2020

@jph00 yes, most of the issues now fall under #498.

@blois blois closed this as completed Sep 19, 2020
@Erhannis
Copy link

I'm having trouble with the Play widget. The buttons don't show their icons, and button presses do not trigger any notable reaction.
Test case: https://colab.research.google.com/drive/1WE2pV0UfgRb0cfOVdCkgo7MzwCkLBdDV#scrollTo=Y8eS_TugFa6i
Note that the same code on a local Jupyter instance works properly; the four buttons have icons, and pressing the play button causes the slider to advance and the output to output, every 2 seconds.

@AJAX6255
Copy link

AJAX6255 commented Sep 29, 2020 via email

@Erhannis
Copy link

Maybe so; not sure how I'd know, really.

@AJAX6255
Copy link

AJAX6255 commented Sep 29, 2020 via email

@AJAX6255
Copy link

AJAX6255 commented Sep 29, 2020 via email

@blois
Copy link
Contributor

blois commented Sep 29, 2020

@Erhannis this sounds like #1302

@Erhannis
Copy link

@blois That does appear to account for the icon problem, at least; thanks. Unfortunately, while the workaround fixes the icons, the widget remains non-functional.

@AJAX6255 Well, I've gotten a !pip list from colab and from a jupyter labs workspace, now:
colab_pip.txt
jupyter_pip.txt

As per your note, I see that the ipython version for colab is 5.5.0, vs. jupyter labs' 7.16.1.
I also note ipykernel v 4.10.1 vs 5.1.4, though I don't really know what is and isn't relevant.
The jupyter-client versions are different, and there are a few differences in exactly which jupyter-related packages are installed.
The versions of ipywidgets appear to be the same.

@AJAX6255
Copy link

AJAX6255 commented Sep 29, 2020 via email

@blois
Copy link
Contributor

blois commented Sep 29, 2020

@Erhannis this looks like it may be an issue with jslink- I just opened https://github.com/googlecolab/colabtools/is.

@Erhannis
Copy link

Oh! @blois , you were right! jslink doesn't work - but the play widget does, actually! This means that while you can't bind two values together like in the docs, you can do the following:

def value_changed(change):
  print(change.new)
play.observe(value_changed,'value')

It's probably tricky to keep two objects in sync like this, without getting e.g. infinite recursion, but for what I wanted to do I only needed a unidirectional link, anyway. Thanks!

@maartenbreddels
Copy link

A good workaround might be link or dlink instead, that goes via the kernel, similar to observe.

@Erhannis
Copy link

Erhannis commented Oct 1, 2020

@maartenbreddels Oh, you mean when observe fires it triggers/requires communication with the server? That might explain why using a different computer in my house causes my hacky "animation" to run much slower than when it's localhost, haha

@maartenbreddels
Copy link

Yes, since it executes Python code, which lives at the server. That's why jslink (which is handled in the browser) usually gives smoother results (but it cannot execute code).

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