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

Make keplergl-jupyter work with JupyterLab 3 #1501

Merged
merged 1 commit into from
Jun 7, 2021

Conversation

bergkvist
Copy link
Contributor

Fixes #1390

Signed-off-by: Tobias Bergkvist <tobias@bergkv.ist>
@bergkvist bergkvist force-pushed the bergkvist/jupyterlab-v3 branch from 365469d to 3db78a6 Compare June 7, 2021 18:55
@heshan0131
Copy link
Contributor

Thanks, will publish a new version

@heshan0131 heshan0131 merged commit 614750f into keplergl:master Jun 7, 2021
@kyri-petrou
Copy link

Very excited for this, thank you very much for it! Is there an ETA for the release?

@bergkvist
Copy link
Contributor Author

bergkvist commented Jun 14, 2021

I changed the version from 0.2.2 to 0.3.0 without checking that it still worked. Seems like I would have also needed to change the version here:
https://github.com/keplergl/kepler.gl/blob/master/bindings/kepler.gl-jupyter/keplergl/_version.py

@duongnt
Copy link

duongnt commented Jun 18, 2021

@heshan0131 any plan to release this fix?

@ondrejsv
Copy link

Hi @bergkvist and @heshan0131, I don't want to spam the thread but it's been half a year since the Jupyter 3.0 was released and we cannot use the kepler.gl in this version. When are you planning to release the fix?

@ondrejsv
Copy link

ondrejsv commented Jul 1, 2021

I see now that a new versions of Kepler.gl and Python keplergl PyPi package (0.3.0) have been released which are compatible with Jupyter Lab 3.0. Thank you.

@heshan0131
Copy link
Contributor

Yep, sorry I forgot to reply, keplergl-jupyter@0.3.0 (js module) and keplergl@0.3.0 (python modules) has been published

@domplicated
Copy link

image
is it working for others?

@heshan0131
Copy link
Contributor

does jupyterlab 3 has a special requirement for widget setup? the js module exits on npm
https://www.npmjs.com/package/keplergl-jupyter

@kyri-petrou
Copy link

kyri-petrou commented Jul 13, 2021

I had a similar issue and resolved it by going through the steps below:

  • Uninstalled both the python and npm (labextension) packages
  • Added MapboxAccessTokenJupyter=<YOUR MAPBOX API TOKEN> to envvars
  • Reinstalled keplergl and rebuilt Jupyterlab

I'm not sure if it was the absence of the mapboxapi key during build or during runtime that fixed it (or if this is related at all) but I had this issue on 2 machines and both times it worked afterwards.

Also, make sure that the envvar is present when you run the code in Jupyter. If in doubt, just add this to the cell running the code:

%env MapboxAccessTokenJupyter=<YOUR TOKEN>

@domplicated
Copy link

domplicated commented Jul 14, 2021

hmm, so far I cannot get a working version. working with docker to get it completely separated from local systen anomalies.

Dockerfile

FROM nikolaik/python-nodejs:python3.8-nodejs15
LABEL maintainer "NAME <EMAIL>"


WORKDIR /code
ADD . .

RUN export MapboxAccessTokenJupyter="A_VALID_TOKEN"

COPY requirements.txt /
RUN pip install -r /requirements.txt

RUN jupyter labextension install keplergl-jupyter
RUN jupyter labextension enable keplergl-jupyter
RUN jupyter lab build

EXPOSE 8666
CMD jupyter lab --ip=0.0.0.0 --port 8666 --allow-root

requirements.txt

jupyterlab==3.0.16
jupyterlab_widgets==1.0.0
keplergl==0.3.0
  1. build and start docker
docker-compose build --no-cache
docker compose up
  1. open jupyterlab
  2. enable extensions in UI
  3. run notebook sample:
    image

@ondrejsv
Copy link

Yes, I got it working in JupyterLab 3.0 without problems:

JupyterLab v3.0.16
keplergl-jupyter v0.3.0 enabled ok

image

@domplicated
Copy link

interesting. any particular order of install? which os?

@ondrejsv
Copy link

No particular installation order.

image

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

Successfully merging this pull request may close these issues.

[Bug][Jupyter Widget] Jupyterlab 3 not supported
6 participants