无法在Jupyter Notebook中安装R软件包 [英] Cannot install R packages in Jupyter Notebook
问题描述
我试图在Jupyter中运行R代码,并添加了R内核.大多数情况下,软件包可以成功安装.但是,某些软件包,例如RCurl
和ggmap
,在安装时会出错.
示例:
install.packages("RCurl")
install.packages("RCurl")中的警告消息: 安装软件包"RCurl"的退出状态为非零"正在更新".Library"中软件包的HTML索引
制作"packages.html" ...完成
我该怎么办?
在安装RCurl
和ggmap
时,尝试在您的install.packages
语句中将CRAN指定为存储库.例如:
install.packages("RCurl", repos='http://cran.us.r-project.org')
Warning message in install.packages("RCurl"):
"installation of package ‘RCurl’ had non-zero exit status"Updating HTML index of packages in '.Library' Making 'packages.html' ... done What should I do? Try to specify CRAN as repository in your This Stack Overflow post on installing R packages through Anaconda/Jupyter beyond those included in R essential provides more detail. (Side note: I had encountered the same issue when trying to install R packages on computer clusters. This solution worked for me.) 这篇关于无法在Jupyter Notebook中安装R软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
install.packages
statement when installing RCurl
and ggmap
. For example:install.packages("RCurl", repos='http://cran.us.r-project.org')