opengeos / leafmap

A Python package for interactive mapping and geospatial analysis with minimal coding in a Jupyter environment
https://leafmap.org
MIT License
3.22k stars 386 forks source link

[JupyterLite] Exception: No module named 'ipykernel.ipkernel' #402

Closed jtpio closed 1 year ago

jtpio commented 1 year ago

Environment Information

This was noticed while testing leafmap on the JupyterLite deployment on https://demo.leafmap.org/lab/index.html.

Description

Trying to import leafmap on a JupyterLite deployment gives the following error:

Exception: No module named 'ipykernel.ipkernel'

image

This is likely related to the change in https://github.com/giswqs/leafmap/pull/396.

What I Did

Visit the demo JupyterLite deployment on https://demo.leafmap.org.

giswqs commented 1 year ago

@jtpio Thanks for reporting. It seems the ipykernel bug has been fixed upstream by ipywidgets. I will remove the ipykernel import from leafmap.

stevecwlau commented 1 year ago

@jtpio Thanks for reporting. It seems the ipykernel bug has been fixed upstream by ipywidgets. I will remove the ipykernel import from leafmap.

Hi Dr. Wu. I am also facing some issues with ipykernel in JupyterLite. Here's what I did: Untitled

giswqs commented 1 year ago

This appears to be an ipywidgets/ipykernel issue with JupyterLite. There is not much leafmap can do. I have not use JupyterLite for a while.

I would suggest using Colab or install JupyterLab locally.

jtpio commented 1 year ago

@stevecwlau this was indeed an issue reported in https://github.com/jupyter-widgets/ipywidgets/issues/3819.

But should now be fixed with the latest version of jupyterlite-pyodide-kernel. So updating the version and / or triggering a new build of the JupyterLite website should fix it.