rstudio / htmltools

Tools for HTML generation and output
https://rstudio.github.io/htmltools/
214 stars 67 forks source link

Update htmltools from 0.5.3 to 0.5.4 in Google Colab with R #359

Open yoshida-gisc opened 1 year ago

yoshida-gisc commented 1 year ago

We would like to use the mapview package in Google Colab. However, even though the mapview package does not require htmltools 0.5.4, we faced the error message that ">= 0.5.4 is required".

image

Could we update the version of htmltools in Google Colab? Is it impossible to do it because the htmltools linked with a core IRkernel?

cpsievert commented 1 year ago

This error will probably go away if you restart the R session (this sort of error can happen when you install.packages() after loading them (e.g., library(htmltools)))

yoshida-gisc commented 1 year ago

I appreciate your suggestion. However, I cannot update the version of htmltools to 0.5.4 in Google Colab even though refresh the session ... .

This issue is also being discussed in https://github.com/r-spatial/mapview/issues/447 .

cpsievert commented 1 year ago

However, I cannot update the version of htmltools to 0.5.4 in Google Colab even though refresh the session ... .

What output do you see when doing install.packages("htmltools") from a fresh R session?

yoshida-gisc commented 1 year ago

install.package("htmltools") is successfully done. But, library(htmltools) is not ... . Some package dependencies may be problematic??

image

cpsievert commented 1 year ago

Ahh, I see, Colab must load {repr} (and probably other packages) on startup which, as a consequence, will also load {htmltools}. Can you install.packages("htmltools") from a terminal?

yoshida-gisc commented 1 year ago

So sorry. I am not sure how to install any R package from a terminal ... .

schloerke commented 1 year ago

Try running callr::r(function() { install.packages("htmltools") }) then refreshing your R session

yoshida-gisc commented 1 year ago

Thank you so much for your comment. I have tried, but results seems to be the same ... . May we need to wait for updating Google Colab to install the version 0.5.4 ... ?? image

lander89 commented 1 year ago

Try running callr::r(function() { install.packages("htmltools") }) then refreshing your R session

THANK YOU! I had a similar issue and this solved it for me