英文:
`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 <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
namespace ‘cli’ 3.2.0 is already loaded, but >= 3.4.0 is required
I tried the following
- Restarting Rstudio
install.packages('cli')
- Opening the command prompt as admin and navigating to
C:\Program Files\R\<R version>\bin\x64
and running R there withR.exe
there, the runninginstall.packages('cli')
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\<username>\Documents\R\win-library\<version>
and deleting the cli
folder. Then opening Rstudio as normal and running install.packages('cli')
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论