无法在jupyter中安装r内核的tidyverse软件包 我最近通过使用conda install -c r r-irkernel安装了Anaconda,并启用了R内核带有irkernel ...

问题描述 投票:0回答:2

inabled rkernel,我从以下参考中获取了以下参考。 -irkernel-in-3-Steps-917519326E41 现在从我尝试键时

conda install -c r r-irkernel
样品是问题,因此当我尝试手动安装jupyter notebook
时,我会得到这个问题:
tidyverse

那么如何在
jsonlite

中安装

Warning message:
"package 'tidyverse' was built under R version 3.6.3"
Error: package or namespace load failed for 'tidyverse' in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 namespace 'jsonlite' 1.6 is already loaded, but >= 1.7.2 is required
Traceback:

1. library("tidyverse")
2. tryCatch({
 .     attr(package, "LibPath") <- which.lib.loc
 .     ns <- loadNamespace(package, lib.loc)
 .     env <- attachNamespace(ns, pos = pos, deps, exclude, include.only)
 . }, error = function(e) {
 .     P <- if (!is.null(cc <- conditionCall(e))) 
 .         paste(" in", deparse(cc)[1L])
 .     else ""
 .     msg <- gettextf("package or namespace load failed for %s%s:\n %s", 
 .         sQuote(package), P, conditionMessage(e))
 .     if (logical.return) 
 .         message(paste("Error:", msg), domain = NA)
 .     else stop(msg, call. = FALSE, domain = NA)
 . })
3. tryCatchList(expr, classes, parentenv, handlers)
4. tryCatchOne(expr, names, parentenv, handlers[[1L]])
5. value[[3L]](cond)
6. stop(msg, call. = FALSE, domain = NA)
	

不要混合
jsonlite' 1.6 is already loaded, but >= 1.7.2 is required

jsonlite

。仅在包裹不在conda上时使用
install.packages("jsonlite") package 'jsonlite' successfully unpacked and MD5 sums checked Warning message: "cannot remove prior installation of package 'jsonlite'"Warning message in file.copy(savedcopy, lib, recursive = TRUE): "problem copying C:\ProgramData\Anaconda3\Lib\R\library\00LOCK\jsonlite\libs\x64\jsonlite.dll to C:\ProgramData\Anaconda3\Lib\R\library\jsonlite\libs\x64\jsonlite.dll: Permission denied"Warning message: "restored 'jsonlite'" The downloaded binary packages are in C:\Users\viny\AppData\Local\Temp\RtmpADyCWE\downloaded_packages
。 Tidyverse在conda上(请参阅anaconda.org/r/r-tidyverse),因此您现在应该
tidyverse package

。 您可能也有兴趣了解提供更多R包的Conda-Forge频道。
r jupyter-notebook tidyverse jupyter-irkernel
2个回答
1
投票
)。在很大程度上,这可以归因于Conda使用其自己的机制来处理图书馆/软件包路径,并且与其他分配系统相互作用并不相互作用。

在Jupyter Notebook中加载Tidyverse时,我也有类似的错误,但是这里的另一个答案对我不起作用。以下网站帮助了我:
https://jonathansoma.com/everything/r/r/r-no-package-called-library/#:〜:text = text =%20Problem,-for%20 example%2C%20 You&text = this this%20m二20m%20M 20BE 20BE%20BE%20 happening %20B,因为到%20install%20 the%20TIDYVERSE%20PAKED
Jonathan的网站提到,当您在计算机上安装了多个版本或R时,可能会发生错误。如果Python使用的R内核与R使用的R内核不同,可能会导致错误。在R Studio中运行以下代码,然后重新启动Jupyter Notebook解决了我的问题:
jupyter notebook

在我的anaconda环境中,我有一个过时的R,并且使用 直到我升级我的conda之后

OPEN ANACONDA提示 Enter Conda更新Conda

Enter conda install -c conda-forge r-base

完成这3个步骤后,我能够安装无问题的包裹


1
投票
最新问题
© www.soinside.com 2019 - 2025. All rights reserved.