Reputation: 40828
Is it possible to use Jupyter Widgets in Google Colaboratory?
I followed the instructions here, both with ipyleaflet and bqplot
But I got this error message.
Failed to display Jupyter Widget of type Map.
If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean that the widgets JavaScript is still loading. If this message persists, it likely means that the widgets JavaScript library is either not installed or not enabled. See the Jupyter Widgets Documentation for setup instructions.
If you're reading this message in another frontend (for example, a static rendering on GitHub or NBViewer), it may mean that your frontend doesn't currently support widgets.
Is it possible to use these widgets? Or did I make a mistake somewhere?
Upvotes: 8
Views: 12650
Reputation: 40828
Now Google Colab has its set of Widgets. See the example here.
https://colab.research.google.com/notebooks/widgets.ipynb
I haven’t compared how diffrent are they from normal Jupyter Widgets, though.
ipywidgets
are supported now. You can test run
the tutorials.
Upvotes: 12
Reputation: 203
some libraries widgets do work including for Bokeh which has a map plotting function which you can use instead of ipyleaflet if you are wishing to use Map Visualisations in Colab:
You can then use their mapping function:
http://docs.bokeh.org/en/latest/docs/user_guide/geo.html
Make sure you include:
from bokeh.io import output_notebook
output_notebook()
Upvotes: 2
Reputation: 1526
It is not currently possible to use them- currently comms messages are not supported, the WidgetManager code is not loaded into outputframes, and multiple output frames on a page is not a configuration that the WidgetManager works with.
Feel free to open a bug at https://github.com/googlecolab/colabtools/issues
Upvotes: 6