简体   繁体   English

R 4.0 使用 Rtools/ 而不是 rtools40/

[英]R 4.0 using Rtools/ instead of rtools40/

I recently updated R from 3.6.1 to 4.0.2.我最近将 R 从 3.6.1 更新到 4.0.2。 Along with that, I updated to the latest version of rtools (rtools40).与此同时,我更新到最新版本的 rtools (rtools40)。 I also followed instructions to add rtools40 to the PATH here .我还按照说明将 rtools40 添加到 PATH here

However, after restarting R, Sys.which("make") gives "C:\\Rtools\\bin\\make.exe" , an older version of Rtools.然而,在重启 R 后, Sys.which("make")给出了"C:\\Rtools\\bin\\make.exe" ,一个旧版本的 Rtools。 But C:/Rtools/bin is not in my PATH.但是C:/Rtools/bin不在我的路径中。

Without deleting the old rtools, how can I tell R to use rtools40?在不删除旧的 rtools 的情况下,我如何告诉 R 使用 rtools40?


Edit : It turns out that the old Rtools was on the system PATH (but not on the user PATH).编辑:原来旧的 Rtools 在系统路径上(但不在用户路径上)。 Removing the old Rtools/ from system PATH fixed the issue.从系统路径中删除旧的 Rtools/ 解决了这个问题。

Posting my comment as an answer, so that others may more easily find the solution:发表我的评论作为答案,以便其他人可以更轻松地找到解决方案:

When updating from Rtools to Rtools40, make sure that the old Rtools is removed from the system and user PATH .从 Rtools 更新到 Rtools40 时,确保从系统和用户PATH中删除旧的 Rtools。 In order to check which version you have in your path, you can use Sys.which("make") like you suggested in your question.为了检查您的路径中有哪个版本,您可以像您在问题中建议的那样使用Sys.which("make")

It is also possible to check by running Sys.getenv("PATH") .也可以通过运行Sys.getenv("PATH")进行检查。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM