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
Map does not display in jupyterlab, "Loading widget..." or "Error displaying widget: model not found" #31
Comments
Solution: Reading ipyleaflet issue 504 I forced a reinstall of the jupyter-leaflet extension from the command line: conda activate sv # or whatever you have named it
jupyter labextension install @jupyter-widgets/jupyterlab-manager jupyter-leaflet
Hope this helps. |
@jmp75 Thanks for the troubleshooting. For users who are having difficulty displaying the map, you can enable the ipyleaflet extension using the following two commands. Then you can type
|
A precision for jupyterlab users, widget registrations are not the same as for jupyter-notebook. To check which extension is registered you should use
|
the solution proposed is not working for me... import geemap.eefolium as geemap However, in a later stage I try to add layers (following tutorial #12): Add Earth Engine datasetdem = ee.Image('USGS/SRTMGL1_003') Set visualization parameters.dem_vis = { Add Earth Engine DEM to mapMap.addLayer(dem, dem_vis, 'SRTM DEM') I cannot see any layers, Dont know why... |
@LucaD81 How did you install geemap? Try the following commands:
|
Hi, thanks for your quick response! |
|
I tried commands of above and that's what I've got: for GColab ok, but I've read there might be some issues with other packages |
See this.
|
nothing yet!
I think I will try in GColab..
Il giorno mar 1 dic 2020 alle ore 15:03 Qiusheng Wu <
notifications@github.com> ha scritto:
… See this
<https://stackoverflow.com/questions/64653745/python-numpy-installation-sanity-check-error>
.
conda activate gee
pip install numpy==1.19.3
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#31 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARU65YNK7JPGX3BBCHHONVDSSTZUFANCNFSM4M2C7UCA>
.
|
@LucaD81 Try creating a fresh conda env to install ipyleaflet first. Make sure that you can show an ipyleaflet map before installing geemap. If ipyleaflet does not work properly, geemap won't work either. https://ipyleaflet.readthedocs.io/en/latest/installation.html
|
I have this same issue. It's an issue with leaflet. Upgrading leaflet to 0.13.6 solves the problem, but geemap currently has a dependency of <=0.13.3 |
@nanodan Thanks for reporting. I temporarily set the ipyleaflet dependency of <=0.13.3 because ipyleaflet >0.13.4 has some installation issues on Windows. See jupyter-widgets/ipyleaflet#769. I will remove the dependency version once the issue gets resolved. |
@giswqs Thanks for the quick update. I can get leaflet widgets to display with 0.13.6 (I'm on windows and had no problems installing). I tried to fork geemap and fix ipyleaflet to 0.13.6 but it seems that once ipyevents gets installed, which is one of the dependencies, it breaks leaflet for some reason... Downgrading ipyevents to 0.8.0 doesn't help. If I remove ipyevents and rebuild jupyterlab then I can display widgets again... though now ipyevents is showing up as both enabled/uninstalled at the same time... and of course it is a requirement, so I'm not entirely sure what the actual problem is. |
@nanodan I just tested the |
Only way I could get this working was to fork it, modify requirements file to remove ipyevents, set ipyleaflet to 0.13.6, install ipyevents after fixed dependencies.. then uninstall ipyevents from jupyterlab, while leaving it as a package, and rebuild jupyterlab, while version-fixing a whole bunch of dependencies. .bat file
where requirements_fulllist.txt is:
Hopefully this helps somebody. |
@nanodan Thanks for providing the solution. Hope it will be helpful for Windows users. |
Having run
The error is cleared but the notebook hangs on |
@robmarkcole This is an ipyleaflet problem rather than geemap. Check jupyter-widgets/ipyleaflet#739 to see if it helps. You can also check out the geemap docker images at https://geemap.org/installation/#use-docker |
I was almost able to follow the solution from @nanodan nanodan to get geemap to work on Jupyter Lab but I needed to modify it slightly. I downloaded GDAL-3.2.3-cp38-cp38-win_amd64.whl and rasterio-1.2.3-cp38-cp38-win_amd64.whl from https://www.lfd.uci.edu/~gohlke/pythonlibs/ and replaced those file names in the .bat file. I'm using conda so I also ran: pipenv install then you can start Jupyter Lab with geemap by running Once you have Jupyter Lab running try running: You will get an error that says something like: Instead of "me" in the folder names it will be your user name. Then you have to create the "Library" and "bin" folder where they are expected (from the error), and copy the geos_c.dll from the "me-ym2aifmq\Lib\site-packages\osgeo" folder to the bin folder you just created (I tried with the shapely provided geos_c.dll and it doesn't work). Now if you try running that cell in Jupyter Lab again it will display a map. This is a very convoluted solution but it does so far seem to work. Also I'm not sure how great of a practice it is to be using conda with pipenv. Anyways, it'd be great to not have to do all this. But since @nanodan had got it working and I had to do some more stuff to get it to work on my end I thought I'd share my solution. Any idea of when there will be a better solution? |
@jpwhitney Thanks for sharing your solution! The other potential solution is to use Windows Subsystem for Linux. I have not tested it yet, but I think WSL could be useful for installing those packages that are very challenging to install on Windows. |
I want to share my experience with the same error: "Error displaying widget: model not found" . using: |
You can also use the geemap Binder JupyterLab environment: https://gishub.org/geemap-lab |
I am betting this is rather an ipyleaflet plus jupyter-lab issue, but I open this ticket hoping to provide workarounds/fixes for other users as this may be one of the first experience (i.e. impression) for newcomers.
Description
example notebook 01_geemap_intro
Map
does not display in the cell output in jupyterlab, instead "Loading widget..." or "Error displaying widget: model not found"Display works if accessed/run from jupyter-notebook however. I think I previously similar symptoms with upyleaflet
What I Did
Updated an existing conda env which had ipyleaflet working.
conda update -c conda-forge python=3.8
, thenconda install -c conda-forge geemap
jupyter-lab opened and requested a rebuild of the extensions:
Once done,
Map
resulted in "Loading widget..." , but I think this was because I should have restarted jupyter-lab. Using the scriptbut upon re-execution of the notebook 01_geemap_intro
Map
then leads to "Error displaying widget: model not found"The text was updated successfully, but these errors were encountered: