Code Monkey home page Code Monkey logo

Comments (6)

SylvainCorlay avatar SylvainCorlay commented on August 15, 2024

@paul-shannon jupyter widgets in jupyterlab is still the bleeding edge.
While most of the work is done, installation is still quite cumbersome. I will post some instructions.

from ipyleaflet.

paul-shannon avatar paul-shannon commented on August 15, 2024

@SylvainCorlay sorry to pester. I'll be grateful for those instructions when you find the time...

from ipyleaflet.

SylvainCorlay avatar SylvainCorlay commented on August 15, 2024

@paul-shannon no problem.

  • So getting ipyleaflet to work in jupyterlab is quite cumbersome for now, since it requires installing ipywidgets from source and ipyleaflet from source
  • Besides, the jupyterlab team is iterating quite rapidly and makes rapid releases with non-backward compatible version numbers (0.x.y) before the first 1.0.

Currently getting ipyleaflet in jupyterlab requires

  1. jupyterlab 0.11.3.
  2. The current state of master in ipywidgets
    • In jupyter-js=widgets, run npm install
    • In widgetsnbextension , run npm install then npm run update then pip install -e .
    • In ipywidgets run pip install -e .
    • In jupyterlab_widgets run npm install then npm run update then pip install -e .
    • jupyter labextension install --py --sys-prefix --symlink jupyterlab_widgets
    • jupyter labextension enable --py --sys-prefix jupyterlab_widgets
  3. Install ipyleaflet from source
    • in js: npm install
    • at the root of the repo: pip install -e .
    • jupyter labextension install --py --sys-prefix --symlink ipyleaflet
    • jupyter labextension enable --py --sys-prefix jupyterlab_widgets

yay!

from ipyleaflet.

paul-shannon avatar paul-shannon commented on August 15, 2024

Many thanks @SylvainCorlay.

All steps went smoothly: thank you for laying them out.

There's a good lesson for me in this: despite your fine instructions, at the end of the process jupyter lab --log-level=0 gets me only a blank screen in the browser, with no contents in the html body of that page. I think I have come too early to jupyter lab development. The "alpha preview" should have warned me away.

Thanks again for your (and Jason's) kindly and patiently offered help. I will continue with ipywidget development in the notebook, returning to lab when the beta is released.

from ipyleaflet.

epifanio avatar epifanio commented on August 15, 2024

Thanks on (Gitter) , now we should be able to pip install jupyterlab,notebook, ipywidgets, and ipyleaflet (latest stable releases), and then jupyter labextension install @jupyter-widgets/jupyterlab-manager --no-build and then run npm install && jupyter labextension install . from the ipyleaflets/jslab folder.

#!/usr/bin/env bash

pip3 install --upgrade pip
pip3 install jupyter
pip3 install notebook
pip3 install jupyterlab
pip3 install ipywidgets
pip3 install ipyleaflet


jupyter labextension install @jupyter-widgets/jupyterlab-manager --no-build

git clone https://github.com/ellisonbg/ipyleaflet
cd ipyleaflet/jslab
npm install && jupyter labextension install .
cd ../..

jupyter nbextension enable --py --sys-prefix ipyleaflet

Note: I used npm from their own PPA (on ubuntu 16.04, with the default system python 3.5)

from ipyleaflet.

SylvainCorlay avatar SylvainCorlay commented on August 15, 2024

ipyleaflet now works in JupyterLab.

It can be installed by installing the pip package on the kernel side and running jupyter labextension install jupyter-leaflet for the lab extension.

from ipyleaflet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.