我正在尝试在colab上安装calendR包。
我正在使用以下内容:
install.packages("calendR")
library(calendR)但是这个错误如下所示:
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
also installing the dependencies ‘magick’, ‘ggimage’
Warning message in install.packages("calendR"):
“installation of package ‘magick’ had non-zero exit status”
Warning message in install.packages("calendR"):
“installation of package ‘ggimage’ had non-zero exit status”
Warning message in install.packages("calendR"):
“installation of package ‘calendR’ had non-zero exit status”
Error in library(calendR): there is no package called ‘calendR’
Traceback:
1. library(calendR)有人知道怎么安装这个吗?
发布于 2021-11-12 15:23:18
默认内核
Google colab默认使用基于ubuntu 18.04的docker容器的Python 3 Google Compute Engine后端。它是为python设计的,具有ipython内核。但是,也安装了R。要安装calendR,请创建并运行一个包含以下内容的新单元:
! add-apt-repository -y ppa:cran/imagemagick
! apt-get update
! apt-get install -y libmagick++-dev
! R -e "install.packages('calendR')"这将执行IPython样式的外壳命令。然后,您可以在新的单元格中执行以下操作:
! R -e "library(calendR)"IR核
Colab还可以托管其他内核,如ir for R。然后,可以使用R命令执行shell命令:
system("add-apt-repository -y ppa:cran/imagemagick")
system("apt-get update")
system("apt-get install -y libmagick++-dev")
install.packages("calendR")
library("calendR")https://stackoverflow.com/questions/69943647
复制相似问题