mapview/mapedit installation on Google colab
We would like to run a spatial analysis in Google Colab using the mapview/mapedit package. However, when trying to install the mapview/mapedit package via the install.package() function, it does not work, even following the manner below:
https://colab.to/r
system("apt-get -y update")
system("apt-get install -y libudunits2-dev libgdal-dev libgeos-dev libproj-dev")
install.packages("mapview")
library("mapview")
This codes are fine for the sf package following the issue (https://github.com/r-spatial/sf/issues/1946). However, it does not seem to be enough for the mapview/mapedit package.
Thanks in advances, Takahiro
Please give the entire output you see after giving the install.packages("mapview") command.
We run the code below in Google Colab.
system("apt-get -y update")
system("apt-get install -y libudunits2-dev libgdal-dev libgeos-dev libproj-dev")
install.packages("mapview")
Then, we faced the error message below. Note that we also faced time-out for running it (about 15 minutes).
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
also installing the dependencies ‘sfheaders’, ‘promises’, ‘geojsonsf’, ‘httpuv’, ‘classInt’,
‘s2’, ‘units’, ‘htmlwidgets’, ‘leafem’, ‘leaflet’, ‘leafpop’, ‘raster’, ‘satellite’, ‘servr’, ‘sf’
Warning message in install.packages("mapview"):
“installation of package ‘s2’ had non-zero exit status”
Warning message in install.packages("mapview"):
“installation of package ‘geojsonsf’ had non-zero exit status”
Warning message in install.packages("mapview"):
“installation of package ‘httpuv’ had non-zero exit status”
Warning message in install.packages("mapview"):
“installation of package ‘leaflet’ had non-zero exit status”
Warning message in install.packages("mapview"):
“installation of package ‘satellite’ had non-zero exit status”
Warning message in install.packages("mapview"):
“installation of package ‘sf’ had non-zero exit status”
Warning message in install.packages("mapview"):
“installation of package ‘leafem’ had non-zero exit status”
Warning message in install.packages("mapview"):
“installation of package ‘leafpop’ had non-zero exit status”
Warning message in install.packages("mapview"):
“installation of package ‘servr’ had non-zero exit status”
Warning message in install.packages("mapview"):
“installation of package ‘mapview’ had non-zero exit status”
We may need to install some system-dependecies. But, we cannot identify it ....
On a fresh colab notebook I can install sf, then mapview, but when loading mapview I get the following error:

htmltools is required by IRkernel, which essentially runs your colab, so cannot be unloaded; re-installing htmltools is possible but we can't load it because of this dependency. I don't see who needs htmltools >= 0.5.4, mapview doesn't say so in its DESCRIPTION.
I appreciate your prompt check! I faced the same error message. A feasible solution may be to wait for IRkernel to require htmltools 0.5.4 ...?
When installing the mapedit package, the same error message occurs.
