Skip to content
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

mapview/mapedit installation on Google colab #447

Open
yoshida-gisc opened this issue Jan 1, 2023 · 5 comments
Open

mapview/mapedit installation on Google colab #447

yoshida-gisc opened this issue Jan 1, 2023 · 5 comments

Comments

@yoshida-gisc
Copy link

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 (r-spatial/sf#1946).
However, it does not seem to be enough for the mapview/mapedit package.

Thanks in advances,
Takahiro

@edzer
Copy link
Member

edzer commented Jan 1, 2023

Please give the entire output you see after giving the install.packages("mapview") command.

@yoshida-gisc
Copy link
Author

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 ....

@edzer
Copy link
Member

edzer commented Jan 1, 2023

On a fresh colab notebook I can install sf, then mapview, but when loading mapview I get the following error:
Screenshot from 2023-01-01 20-48-33

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.

@yoshida-gisc
Copy link
Author

yoshida-gisc commented Jan 1, 2023

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 ...?

@yoshida-gisc
Copy link
Author

When installing the mapedit package, the same error message occurs.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants