简体   繁体   English

错误:“ggplot2”的包或命名空间加载失败:包“ggplot2”是在 R 4.0.0 之前安装的:请重新安装执行停止

[英]Error: package or namespace load failed for 'ggplot2': package 'ggplot2' was installed before R 4.0.0: please re-install it Execution halted

I'm really stuck and need some help.我真的被困住了,需要一些帮助。

After installing R 4.0.2, I'm getting this error message on R visualizations in Power BI Desktop which were previously working安装 R 4.0.2 后,我在 Power BI Desktop 中的 R 可视化中收到此错误消息

"Error: package or namespace load failed for 'ggplot2':
 package 'ggplot2' was installed before R 4.0.0: please re-install it.
 Execution halted"

I already tried to:我已经尝试过:

reinstall R 4.0.2

reinstall RStudio

reinstall ggplot2 

reinstall all packages

reinstall Power BI Desktop. My version is August-2020

Still it does not work.它仍然不起作用。

Considerations:注意事项:

My visualizations were working well before I installed R 4.0.2

My visualizations are working well on other PCs

When I run the code on RStudio I don't get any error

Any thoughts?有什么想法吗?

You probably need to go here: https://powerbi.microsoft.com/en-us/support/ , but some guesses:您可能需要去这里: https : //powerbi.microsoft.com/en-us/support/ ,但有些猜测:

When you did the reinstall, you didn't clean up the old one, so you now have a mix of old and new versions of things.当你重新安装时,你没有清理旧的,所以你现在有新旧版本的混合。 If you can run R code, run如果您可以运行 R 代码,请运行

system.file(package="ggplot2")

That's where it is finding the bad version of ggplot2 .这就是它找到错误版本的ggplot2 Get rid of it, and reinstall.摆脱它,并重新安装。 If that's not enough, run如果这还不够,请运行

.libPaths()

in the broken copy of R. Completely eradicate every directory mentioned there, and reinstall R and all of your contributed packages.在 R 的损坏副本中。完全删除那里提到的每个目录,并重新安装 R 和所有你贡献的包。 (I don't use Power BI, so this might also require you to wipe out some part of it: do so, and reinstall it.) (我不使用 Power BI,因此这可能还需要您清除其中的某些部分:这样做,然后重新安装。)

After all of this, run在这一切之后,运行

packageDescription("ggplot2")

In the last line (or close to it) of what gets printed, you should see something like this:在打印内容的最后一行(或接近它)中,您应该看到如下内容:

Built: R 4.0.2; ; 2020-07-16 22:49:23 UTC; unix

If you see that it was built before 4.0.2, then either you missed deleting something, or you (or Microsoft) reinstalled some old version.如果您看到它是在 4.0.2 之前构建的,那么要么您错过了删除某些内容,要么您(或 Microsoft)重新安装了某个旧版本。 Then it's probably time to contact that URL above.那么可能是时候联系上面的那个 URL 了。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 R:“mxnet”的命名空间加载失败:package“mxnet”是在 R 4.0.0 之前安装的:请重新安装它 - R: namespace load failed for ‘mxnet’: package ‘mxnet’ was installed before R 4.0.0: please re-install it Package R 4.0.0之前安装了'XXX':请重新安装 - Package ‘XXX’ was installed before R 4.0.0: please re-install it 库中的错误(ggplot2):没有名为“ggplot2”的包执行停止 - Error in library(ggplot2) : there is no package called ‘ggplot2’ Execution halted PowerBI Desktop 和 R 错误:“ggplot2”的包或命名空间加载失败 - PowerBI Desktop and R Error: package or namespace load failed for 'ggplot2' 错误:package 或 ggplot2 和 data.table 的命名空间加载失败 - Error: package or namespace load failed for ggplot2 and for data.table 在 R 4.0.0 之前安装了包“xxx”:请重新安装(已经完成全新安装并检查了 lib 路径) - Package 'xxx’ was installed before R 4.0.0: please re-install it (already done fresh install and checked lib paths) Package 'stringr' 在 R 4.0.0 之前安装:请重新安装 BiocManager 安装路径不可写,无法更新软件包 - Package ‘stringr’ was installed before R 4.0.0: please re-install it BiocManager Installation path not writeable, unable to update packages 加载 ggplot2 时抛出错误:package 或命名空间加载失败....没有 package 称为“颜色空间” - Loading ggplot2 throwing the Error: package or namespace load failed .... there is no package called ‘colorspace’ 失败并发生错误:R 3.0.0之前已构建“包'sentiment':请重新安装” - Failed with error: ‘package ‘sentiment’ was built before R 3.0.0: please re-install it’ R 3.4.2 库中的错误(ggplot2):没有名为“ggplot2”的包 - R 3.4.2 Error in library(ggplot2) : There is no package called 'ggplot2'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM