解决conda的R包安装的依赖问题-以tidyverse为例

发布于:2025-03-28 ⋅ 阅读:(23) ⋅ 点赞:(0)

本来使用conda安装R就是为了节约时间,不浪费解决依赖上,但是没想到还是有坑。

首先我创建一个R=4.4.2的环境

conda create -c conda-forge -n R442 r-base=4.4.2
conda activate R442

然后我尝试安装 tidyverse,这就是噩梦的来源,因为tidyverse是一堆包的集合,尤其是其中的httr,如果你的系统是刚安装的,为了装这个包,你得装不少的依赖。

also installing the dependencies ‘fastmap’, ‘lattice’, ‘colorspace’, ‘sys’, ‘bit’, ‘ps’, ‘base64enc’, ‘sass’, ‘digest’, ‘cachem’, ‘nlme’, ‘Matrix’, ‘farver’, ‘labeling’, ‘munsell’, ‘RColorBrewer’, ‘viridisLite’, ‘rappdirs’, ‘rematch’, ‘askpass’, ‘bit64’, ‘prettyunits’, ‘processx’, ‘evaluate’, ‘highr’, ‘xfun’, ‘yaml’, ‘bslib’, ‘fontawesome’, ‘htmltools’, ‘jquerylib’, ‘tinytex’, ‘backports’, ‘generics’, ‘glue’, ‘lifecycle’, ‘memoise’, ‘blob’, ‘DBI’, ‘R6’, ‘tidyselect’, ‘vctrs’, ‘withr’, ‘data.table’, ‘gtable’, ‘isoband’, ‘MASS’, ‘mgcv’, ‘scales’, ‘gargle’, ‘uuid’, ‘cellranger’, ‘curl’, ‘ids’, ‘rematch2’, ‘cpp11’, ‘pkgconfig’, ‘mime’, ‘openssl’, ‘timechange’, ‘utf8’, ‘systemfonts’, ‘textshaping’, ‘clipr’, ‘crayon’, ‘vroom’, ‘tzdb’, ‘progress’, ‘callr’, ‘fs’, ‘knitr’, ‘rmarkdown’, ‘selectr’, ‘stringi’, ‘fansi’, ‘broom’, ‘conflicted’, ‘cli’, ‘dbplyr’, ‘dplyr’, ‘dtplyr’, ‘forcats’, ‘ggplot2’, ‘googledrive’, ‘googlesheets4’, ‘haven’, ‘hms’, ‘httr’, ‘jsonlite’, ‘lubridate’, ‘magrittr’, ‘modelr’, ‘pillar’, ‘purrr’, ‘ragg’, ‘readr’, ‘readxl’, ‘reprex’, ‘rlang’, ‘rstudioapi’, ‘rvest’, ‘stringr’, ‘tibble’, ‘tidyr’, ‘xml2

安装的时候会出现如下的报错

install.packages("tidyverse")

# 错误