question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pydeck (jupyter lab) does not work together with keplergl

See original GitHub issue

I can’t seem to get both keplergl and pydeck widgets to work in JupyterLab at the same time

keplergl alone works fine

pip install keplergl==0.2.1 && jupyter labextension install keplergl-jupyter@0.2.1
import keplergl
display(keplergl.KeplerGl()) # Displays map

pydeck alone works fine

pip install pydeck==0.4.1 && jupyter labextension install @deck.gl/jupyter-widget@8.2.7
import pydeck
display(pydeck.Deck(mapbox_key='...').show()) # Displays map

keplergl and pydeck at the same time does not work

pip install keplergl==0.2.1 && jupyter labextension install keplergl-jupyter@0.2.1
pip install pydeck==0.4.1 && jupyter labextension install @deck.gl/jupyter-widget@8.2.7

image

import pydeck
display(pydeck.Deck(mapbox_key='...').show()) # Error displaying widget: model not found

import keplergl
display(keplergl.KeplerGl()) # Displays map

Reversing installation order reverses the problem:

pip install pydeck==0.4.1 && jupyter labextension install @deck.gl/jupyter-widget@8.2.7
pip install keplergl==0.2.1 && jupyter labextension install keplergl-jupyter@0.2.1

image

import pydeck
display(pydeck.Deck(mapbox_key='...').show()) # Displays map

import keplergl
display(keplergl.KeplerGl()) # Error displaying widget: model not found

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
bergkvistcommented, Aug 31, 2020

@ajduberstein

Broken environment (jupyter labextension list):

JupyterLab v1.2.5
Known labextensions:
   app dir: /usr/share/jupyter/lab
        @deck.gl/jupyter-widget v8.2.7  enabled  OK
        @jupyter-widgets/jupyterlab-manager v1.1.0  enabled  OK
        jupyter-matplotlib v0.5.0  enabled  OK
        jupyterlab-plotly v4.8.0  enabled  OK
        keplergl-jupyter v0.2.1  enabled  OK
        plotlywidget v4.8.0  enabled  OK

Working environment (jupyter labextension list):

JupyterLab v2.2.5
Known labextensions:
   app dir: /opt/conda/share/jupyter/lab
        @bokeh/jupyter_bokeh v2.0.3  enabled  OK
        @deck.gl/jupyter-widget v8.2.7  enabled  OK
        @jupyter-widgets/jupyterlab-manager v2.0.0  enabled  OK
        @krassowski/jupyterlab-lsp v1.1.2  enabled  OK
        dask-labextension v3.0.0  enabled  OK
        jupyter-matplotlib v0.7.3  enabled  OK
        jupyterlab-plotly v4.9.0  enabled  OK
        keplergl-jupyter v0.2.1  enabled  OK
        plotlywidget v4.9.0  enabled  OK

Notice @jupyter-widgets/jupyterlab-manager, which has different major versions (and is a dependency of keplergl-jupyter and @deck.gl/jupyter-widget).

1reaction
kylebarroncommented, Aug 31, 2020

FYI I tried this out and I see in the browser console:

Error: deck.gl - multiple versions detected: 8.2.7 vs 8.2.5
    at Object.push.WQvm (vendors~main.bb9e8da21be7567696e5.js:391674)
    at r (vendors~main.bb9e8da21be7567696e5.js:391657)
    at Object.push.WQvm (vendors~main.bb9e8da21be7567696e5.js:391674)
    at r (vendors~main.bb9e8da21be7567696e5.js:391657)
    at Module.push.WQvm (vendors~main.bb9e8da21be7567696e5.js:391657)
    at r (vendors~main.bb9e8da21be7567696e5.js:391657)
    at Object.<anonymous> (vendors~main.bb9e8da21be7567696e5.js:391674)
    at Object.push.WQvm (vendors~main.bb9e8da21be7567696e5.js:391674)
    at r (vendors~main.bb9e8da21be7567696e5.js:391657)
    at Object.push.WQvm (vendors~main.bb9e8da21be7567696e5.js:391657)

At first glance it looks like that’s the cause of the widget model not found errors.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Bug][Jupyter Widget] Error displaying widget: model not found
show() in a Jupyter Lab cell returns Error displaying widget: model not found . A work-around in pydeck is to run deck.to_html() and...
Read more >
Installing pydeck - Read the Docs
Install the library via pip or conda; Enable pydeck for JupyterLab or Jupyter Notebook ... Currently Google Maps is not supported for 3D...
Read more >
Error when visualizing data in kepler gl in jupyter notebook
I want to visualize data on a kepler gl map using a jupyter notebook. ... Is there a problem with the Pandas DataFrame...
Read more >
Geospatial Analysis using Kepler gl and Pydeck | Kaggle
Our Aim is to do Geospatial analysis using Kepler Gl and Pydeck,A framework that helps to visualize Big data on Map .
Read more >
Get Started - geemap
An interactive map created using one of the plotting backends can be displayed in a Jupyter environment, such as Google Colab, Jupyter Notebook,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found