“tidyverse”包在R中未加载,因为”cli”版本不兼容。

huangapple go评论59阅读模式
英文:

`tidyverse` package in R not loading due to `cli` version

问题

以下是翻译好的部分:

"我尝试加载tidyverse包时,在RStudio中收到以下错误(没有其他包出现错误):

Loading required package: tidyverse
Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 namespace ‘cli’ 3.2.0 is already loaded, but >= 3.4.0 is required

我尝试了以下方法:

  • 重新启动RStudio
  • 运行install.packages('cli')
  • 以管理员身份打开命令提示符,并导航到C:\Program Files\R\<R版本>\bin\x64,然后在那里运行R.exe,然后运行install.packages('cli')

如何解决这个错误?"

英文:

I was received the following error when trying to load the tidyverse package in R in Rstudio (no other packages were throwing an error)

Loading required package: tidyverse
Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j &lt;- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 namespace ‘cli’ 3.2.0 is already loaded, but &gt;= 3.4.0 is required

I tried the following

  • Restarting Rstudio
  • install.packages(&#39;cli&#39;)
  • Opening the command prompt as admin and navigating to C:\Program Files\R\&lt;R version&gt;\bin\x64 and running R there with R.exe there, the running install.packages(&#39;cli&#39;)

How can I resolve this error?

答案1

得分: 1

成功的方法是导航到 C:\Users\<username>\Documents\R\win-library\<version> 并删除 cli 文件夹。然后像平常一样打开 Rstudio 并运行 install.packages('cli')

英文:

What worked was navigating to C:\Users\&lt;username&gt;\Documents\R\win-library\&lt;version&gt; and deleting the cli folder. Then opening Rstudio as normal and running install.packages(&#39;cli&#39;)

huangapple
  • 本文由 发表于 2023年2月10日 15:23:08
  • 转载请务必保留本文链接:https://go.coder-hub.com/75408023.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定