Opened 2 years ago

Closed 19 months ago

#2389 closed defect (fixed)

ipyleaflet notebook

Reported by: darkblueb Owned by: osgeolive@…
Priority: major Milestone: OSGeoLive16.0
Component: OSGeoLive Keywords: jupyter, ipyleaflet
Cc:

Description

build 157 ol15

    /usr/lib/python3/dist-packages/ipyleaflet-0.17.0.egg-info
from ipyleaflet.leaflet import Map, Marker

center = (52.204793, 360.121558)

m = Map(center=center, zoom=15)

marker = Marker(location=center, draggable=True)
m.add_layer(marker);

display(m)

# Now that the marker is on the Map, you can drag it with your mouse,
# it will automatically update the `marker.location` attribute in Python

# You can also update the marker location from Python, that will update the
# marker location on the Map:
marker.location = (50, 356)
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
/tmp/ipykernel_2816/2413662246.py in <module>
----> 1 from ipyleaflet.leaflet import Map, Marker
      2 
      3 center = (52.204793, 360.121558)
      4 
      5 m = Map(center=center, zoom=15)

/usr/lib/python3/dist-packages/ipyleaflet/leaflet.py in <module>
     16 )
     17 
---> 18 from ipywidgets.widgets.trait_types import InstanceDict
     19 from ipywidgets.embed import embed_minimal_html
     20 

ImportError: cannot import name 'InstanceDict' from 'ipywidgets.widgets.trait_types' (/usr/lib/python3/dist-packages/ipywidgets/widgets/trait_types.py)

Change History (5)

comment:1 by kalxas, 2 years ago

Probably a version issue.

We use the ubuntu upstream package for ipywidgets 6.0.0 https://packages.ubuntu.com/jammy/python3-ipywidgets

I am considering to downgrade ipyleaflet to a previous version.

comment:2 by darkblueb, 2 years ago

build 162 python 3.10

 
MISSING:
jupyterlab-widgets>=1.0.0
python-dateutil>=2.8.2
INSTALLED:
argon2-cffi==21.1.0
attrs==21.2.0
azure-mgmt-azurestack==1.0.0
azure-mgmt-azurestackhci==6.1.0b1
backcall==0.2.0
cloudpickle==2.0.0
django-haystack==3.1.1
geonode-oauth-toolkit==2.2.2
ipython==7.31.1
ipython_genutils==0.2.0
ipywidgets==6.0.0
jedi==0.18.0
jsonschema==3.2.0
jupyter-client==7.1.2
jupyter-packaging==0.11.1
jupyterlab-pygments==0.1.2
matplotlib-inline==0.1.3
nbclient==0.5.6
nbconvert==6.4.0
nbformat==5.1.3
nest-asyncio==1.5.4
notebook==6.4.8
packaging==21.3
pickleshare==0.7.5
prompt-toolkit==3.0.28
ptyprocess==0.7.0
pyzmq==22.3.0
six==1.16.0
tornado==6.1
traitlets==5.1.1
traittypes==0.2.1
widgetsnbextension==2.0.0
xyzservices==2022.6.0

manual install of ipyleaflet 0.17.0

user@osgeolive:~$ pip3 install --user --force ipyleaflet
Collecting ipyleaflet
  Downloading ipyleaflet-0.17.0-py2.py3-none-any.whl (3.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.3/3.3 MB 391.4 kB/s eta 0:00:00
Collecting xyzservices>=2021.8.1
  Downloading xyzservices-2022.6.0-py3-none-any.whl (36 kB)
Collecting traittypes<3,>=0.2.1
  Downloading traittypes-0.2.1-py2.py3-none-any.whl (8.6 kB)
Collecting ipywidgets<8,>=7.6.0
  Downloading ipywidgets-7.7.1-py2.py3-none-any.whl (123 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 123.4/123.4 KB 344.7 kB/s eta 0:00:00
Collecting jupyterlab-widgets>=1.0.0
  Downloading jupyterlab_widgets-1.1.1-py3-none-any.whl (245 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 245.3/245.3 KB 393.1 kB/s eta 0:00:00
Collecting traitlets>=4.3.1
  Downloading traitlets-5.3.0-py3-none-any.whl (106 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 106.8/106.8 KB 421.1 kB/s eta 0:00:00
Collecting widgetsnbextension~=3.6.0
  Downloading widgetsnbextension-3.6.1-py2.py3-none-any.whl (1.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 393.4 kB/s eta 0:00:00
Collecting ipython>=4.0.0
  Downloading ipython-8.4.0-py3-none-any.whl (750 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 750.8/750.8 KB 395.3 kB/s eta 0:00:00
Collecting ipykernel>=4.5.1
  Downloading ipykernel-6.15.1-py3-none-any.whl (132 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 132.9/132.9 KB 399.8 kB/s eta 0:00:00
Collecting ipython-genutils~=0.2.0
  Downloading ipython_genutils-0.2.0-py2.py3-none-any.whl (26 kB)
Collecting psutil
  Downloading psutil-5.9.1-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (282 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 282.0/282.0 KB 402.4 kB/s eta 0:00:00
Collecting pyzmq>=17
  Downloading pyzmq-23.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 394.0 kB/s eta 0:00:00
Collecting matplotlib-inline>=0.1
  Downloading matplotlib_inline-0.1.3-py3-none-any.whl (8.2 kB)
Collecting packaging
  Downloading packaging-21.3-py3-none-any.whl (40 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 40.8/40.8 KB 543.9 kB/s eta 0:00:00
Collecting jupyter-client>=6.1.12
  Downloading jupyter_client-7.3.4-py3-none-any.whl (132 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 132.1/132.1 KB 410.6 kB/s eta 0:00:00
Collecting nest-asyncio
  Downloading nest_asyncio-1.5.5-py3-none-any.whl (5.2 kB)
Collecting debugpy>=1.0
  Downloading debugpy-1.6.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 393.0 kB/s eta 0:00:00
Collecting tornado>=6.1
  Downloading tornado-6.2-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (423 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 424.0/424.0 KB 397.0 kB/s eta 0:00:00
Collecting setuptools>=18.5
  Downloading setuptools-63.3.0-py3-none-any.whl (1.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 393.9 kB/s eta 0:00:00
Collecting pexpect>4.3
  Downloading pexpect-4.8.0-py2.py3-none-any.whl (59 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 59.0/59.0 KB 455.0 kB/s eta 0:00:00
Collecting stack-data
  Downloading stack_data-0.3.0-py3-none-any.whl (23 kB)
Collecting pygments>=2.4.0
  Downloading Pygments-2.12.0-py3-none-any.whl (1.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 393.5 kB/s eta 0:00:00
Collecting pickleshare
  Downloading pickleshare-0.7.5-py2.py3-none-any.whl (6.9 kB)
Collecting jedi>=0.16
  Downloading jedi-0.18.1-py2.py3-none-any.whl (1.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 393.5 kB/s eta 0:00:00
Collecting backcall
  Downloading backcall-0.2.0-py2.py3-none-any.whl (11 kB)
Collecting prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0
  Downloading prompt_toolkit-3.0.30-py3-none-any.whl (381 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 381.7/381.7 KB 399.7 kB/s eta 0:00:00
Collecting decorator
  Downloading decorator-5.1.1-py3-none-any.whl (9.1 kB)
Collecting notebook>=4.4.1
  Downloading notebook-6.4.12-py3-none-any.whl (9.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.9/9.9 MB 391.6 kB/s eta 0:00:00
Collecting parso<0.9.0,>=0.8.0
  Downloading parso-0.8.3-py2.py3-none-any.whl (100 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100.8/100.8 KB 303.4 kB/s eta 0:00:00
Collecting jupyter-core>=4.9.2
  Downloading jupyter_core-4.11.1-py3-none-any.whl (88 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 88.4/88.4 KB 266.8 kB/s eta 0:00:00
Collecting entrypoints
  Downloading entrypoints-0.4-py3-none-any.whl (5.3 kB)
Collecting python-dateutil>=2.8.2
  Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 247.7/247.7 KB 399.1 kB/s eta 0:00:00
Collecting prometheus-client
  Downloading prometheus_client-0.14.1-py3-none-any.whl (59 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 59.5/59.5 KB 452.9 kB/s eta 0:00:00
Collecting Send2Trash>=1.8.0
  Downloading Send2Trash-1.8.0-py3-none-any.whl (18 kB)
Collecting terminado>=0.8.3
  Downloading terminado-0.15.0-py3-none-any.whl (16 kB)
Collecting jinja2
  Downloading Jinja2-3.1.2-py3-none-any.whl (133 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.1/133.1 KB 409.6 kB/s eta 0:00:00
Collecting nbconvert>=5
  Downloading nbconvert-6.5.0-py3-none-any.whl (561 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 561.6/561.6 KB 396.4 kB/s eta 0:00:00
Collecting argon2-cffi
  Downloading argon2_cffi-21.3.0-py3-none-any.whl (14 kB)
Collecting nbformat
  Downloading nbformat-5.4.0-py3-none-any.whl (73 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 73.3/73.3 KB 434.9 kB/s eta 0:00:00
Collecting ptyprocess>=0.5
  Downloading ptyprocess-0.7.0-py2.py3-none-any.whl (13 kB)
Collecting wcwidth
  Downloading wcwidth-0.2.5-py2.py3-none-any.whl (30 kB)
Collecting pyparsing!=3.0.5,>=2.0.2
  Downloading pyparsing-3.0.9-py3-none-any.whl (98 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 98.3/98.3 KB 425.0 kB/s eta 0:00:00
Collecting pure-eval
  Downloading pure_eval-0.2.2-py3-none-any.whl (11 kB)
Collecting asttokens
  Downloading asttokens-2.0.5-py2.py3-none-any.whl (20 kB)
Collecting executing
  Downloading executing-0.9.1-py2.py3-none-any.whl (16 kB)
Collecting tinycss2
  Downloading tinycss2-1.1.1-py3-none-any.whl (21 kB)
Collecting bleach
  Downloading bleach-5.0.1-py3-none-any.whl (160 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 160.9/160.9 KB 407.4 kB/s eta 0:00:00
Collecting mistune<2,>=0.8.1
  Downloading mistune-0.8.4-py2.py3-none-any.whl (16 kB)
Collecting nbclient>=0.5.0
  Downloading nbclient-0.6.6-py3-none-any.whl (71 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 71.8/71.8 KB 434.8 kB/s eta 0:00:00
Collecting jupyterlab-pygments
  Downloading jupyterlab_pygments-0.2.2-py2.py3-none-any.whl (21 kB)
Collecting defusedxml
  Downloading defusedxml-0.7.1-py2.py3-none-any.whl (25 kB)
Collecting beautifulsoup4
  Downloading beautifulsoup4-4.11.1-py3-none-any.whl (128 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 128.2/128.2 KB 414.1 kB/s eta 0:00:00
Collecting pandocfilters>=1.4.1
  Downloading pandocfilters-1.5.0-py2.py3-none-any.whl (8.7 kB)
Collecting MarkupSafe>=2.0
  Downloading MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
Collecting jsonschema>=2.6
  Downloading jsonschema-4.9.0-py3-none-any.whl (79 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 79.5/79.5 KB 432.0 kB/s eta 0:00:00
Collecting fastjsonschema
  Downloading fastjsonschema-2.16.1-py3-none-any.whl (22 kB)
Collecting six>=1.5
  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting argon2-cffi-bindings
  Downloading argon2_cffi_bindings-21.2.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (86 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 86.2/86.2 KB 426.9 kB/s eta 0:00:00
Collecting attrs>=17.4.0
  Downloading attrs-22.1.0-py2.py3-none-any.whl (58 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.8/58.8 KB 460.5 kB/s eta 0:00:00
Collecting pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0
  Downloading pyrsistent-0.18.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (115 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 115.8/115.8 KB 412.6 kB/s eta 0:00:00
Collecting cffi>=1.0.1
  Downloading cffi-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (441 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 441.8/441.8 KB 397.1 kB/s eta 0:00:00
Collecting soupsieve>1.2
  Downloading soupsieve-2.3.2.post1-py3-none-any.whl (37 kB)
Collecting webencodings
  Downloading webencodings-0.5.1-py2.py3-none-any.whl (11 kB)
Collecting pycparser
  Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 118.7/118.7 KB 419.1 kB/s eta 0:00:00
Installing collected packages: webencodings, wcwidth, Send2Trash, pure-eval, ptyprocess, pickleshare, mistune, ipython-genutils, fastjsonschema, executing, backcall, xyzservices, traitlets, tornado, tinycss2, soupsieve, six, setuptools, pyzmq, pyrsistent, pyparsing, pygments, pycparser, psutil, prompt-toolkit, prometheus-client, pexpect, parso, pandocfilters, nest-asyncio, MarkupSafe, jupyterlab-widgets, jupyterlab-pygments, entrypoints, defusedxml, decorator, debugpy, attrs, traittypes, terminado, python-dateutil, packaging, matplotlib-inline, jupyter-core, jsonschema, jinja2, jedi, cffi, bleach, beautifulsoup4, asttokens, stack-data, nbformat, jupyter-client, argon2-cffi-bindings, nbclient, ipython, argon2-cffi, nbconvert, ipykernel, notebook, widgetsnbextension, ipywidgets, ipyleaflet
  WARNING: The script send2trash is installed in '/home/user/.local/bin' which is not on PATH.                                                                          
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.                                                     
  WARNING: The script pygmentize is installed in '/home/user/.local/bin' which is not on PATH.                                                                          
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.                                                     
  WARNING: The scripts jupyter, jupyter-migrate and jupyter-troubleshoot are installed in '/home/user/.local/bin' which is not on PATH.                                 
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.                                                     
  WARNING: The script jsonschema is installed in '/home/user/.local/bin' which is not on PATH.                                                                          
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.                                                     
  WARNING: The script jupyter-trust is installed in '/home/user/.local/bin' which is not on PATH.                                                                       
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.                                                     
  WARNING: The scripts jupyter-kernel, jupyter-kernelspec and jupyter-run are installed in '/home/user/.local/bin' which is not on PATH.                                
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.                                                     
  WARNING: The script jupyter-execute is installed in '/home/user/.local/bin' which is not on PATH.                                                                     
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.                                                     
  WARNING: The scripts ipython and ipython3 are installed in '/home/user/.local/bin' which is not on PATH.                                                              
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.                                                     
  WARNING: The scripts jupyter-dejavu and jupyter-nbconvert are installed in '/home/user/.local/bin' which is not on PATH.                                              
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.                                                     
  WARNING: The scripts jupyter-bundlerextension, jupyter-nbextension, jupyter-notebook and jupyter-serverextension are installed in '/home/user/.local/bin' which is not on PATH.                                                                           
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.                                                     
Successfully installed MarkupSafe-2.1.1 Send2Trash-1.8.0 argon2-cffi-21.3.0 argon2-cffi-bindings-21.2.0 asttokens-2.0.5 attrs-22.1.0 backcall-0.2.0 beautifulsoup4-4.11.1 bleach-5.0.1 cffi-1.15.1 debugpy-1.6.2 decorator-5.1.1 defusedxml-0.7.1 entrypoints-0.4 executing-0.9.1 fastjsonschema-2.16.1 ipykernel-6.15.1 ipyleaflet-0.17.0 ipython-8.4.0 ipython-genutils-0.2.0 ipywidgets-7.7.1 jedi-0.18.1 jinja2-3.1.2 jsonschema-4.9.0 jupyter-client-7.3.4 jupyter-core-4.11.1 jupyterlab-pygments-0.2.2 jupyterlab-widgets-1.1.1 matplotlib-inline-0.1.3 mistune-0.8.4 nbclient-0.6.6 nbconvert-6.5.0 nbformat-5.4.0 nest-asyncio-1.5.5 notebook-6.4.12 packaging-21.3 pandocfilters-1.5.0 parso-0.8.3 pexpect-4.8.0 pickleshare-0.7.5 prometheus-client-0.14.1 prompt-toolkit-3.0.30 psutil-5.9.1 ptyprocess-0.7.0 pure-eval-0.2.2 pycparser-2.21 pygments-2.12.0 pyparsing-3.0.9 pyrsistent-0.18.1 python-dateutil-2.8.2 pyzmq-23.2.0 setuptools-63.3.0 six-1.16.0 soupsieve-2.3.2.post1 stack-data-0.3.0 terminado-0.15.0 tinycss2-1.1.1 tornado-6.2 traitlets-5.3.0 traittypes-0.2.1 wcwidth-0.2.5 webencodings-0.5.1 widgetsnbextension-3.6.1 xyzservices-2022.6.0

Version 3, edited 2 years ago by darkblueb (previous) (next) (diff)

comment:3 by kalxas, 23 months ago

Milestone: OSGeoLive15.0OSGeoLive16.0

Ticket retargeted after milestone closed

comment:4 by darkblueb, 19 months ago

fixed in ol16 alpha 3

user@osgeolive:~$ apt show python3-ipyleaflet
Package: python3-ipyleaflet
Version: 0.17.0-0~jammy1
Priority: optional
Section: python
Source: ipyleaflet
Maintainer: Angelos Tzotsos <gcpp.kalxas@gmail.com>
Installed-Size: 10.8 MB
Depends: python3-ipywidgets, python3-traittypes, python3:any, python3-jupyter-packaging, python3-xyzservices
Download-Size: 1104 kB
APT-Manual-Installed: yes
APT-Sources: http://ppa.launchpad.net/osgeolive/nightly/ubuntu jammy/main amd64 Packages
Description: A Jupyter widget for dynamic Leaflet maps.

comment:5 by darkblueb, 19 months ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.