简体   繁体   English

Rtools 3.5无法识别?

[英]Rtools 3.5 not recognized?

I just installed R3.5 (and RStudio) on a new computer that has not previously had R on it. 我刚刚在新的计算机上安装了R3.5(和RStudio),而该计算机以前没有R。 I then installed the devtools package, and when I went to install a package off of github, I realized (when prompted!) I had forgotten to install Rtools, so I followed the prompts to do so. 然后,我安装了devtools软件包,当我从github上安装软件包时,我意识到(提示时!)我忘记安装Rtools,所以我按照提示进行安装。 Interestingly, this R tools installed to the directory of C:\\RBuildTools by default and with no prompts for setting path variables as I had recalled in previous versions. 有趣的是,此R工具默认情况下安装在C:\\ RBuildTools目录中,并且没有像我在先前版本中提到的那样提示设置路径变量。

When I reloaded R, I was prompted to install Rtools again. 重新加载R时,系统提示我再次安装Rtools。 My path contained no reference to Rtools (or the Rbuildtools directory), and remembering that my past installations had used the dir C:\\Rtools, I decided to uninstall C:\\RBuildTools and installed a fresh version off http://cran.r-project.org/bin/windows/Rtools/ ( installed version 3.5) into C:\\Rtools. 我的路径未包含对Rtools(或Rbuildtools目录)的引用,并且记住我以前的安装使用了目录C:\\ Rtools,所以我决定卸载C:\\ RBuildTools并从http: //cran.r安装了新版本。 -project.org/bin/windows/Rtools/ (安装的版本3.5)到C:\\ Rtools。 In installation I had the path variable option checked. 在安装中,我检查了路径变量选项。

I reloaded RStudio and checked to make sure Rtools was found: 我重新加载了RStudio并检查以确保找到了Rtools:

> devtools::find_rtools()
Error in system(full, intern = TRUE, ignore.stderr = quiet, ...) : running command '"C:/PROGRA~1/R/R-35~1.0/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD config CC' had status 2

However, rtools appears in my PATH: 但是,rtools出现在我的PATH中:

> Sys.getenv("PATH")
[1] "C:\\Program Files\\R\\R-3.5.0\\bin\\x64;C:\\Rtools\\bin;..."

So this doesn't appear to be an issue with Rtools not being added properly to my Path variable. 因此,如果Rtools未正确添加到我的Path变量中,这似乎不是问题。 Google searches have turned up seemingly related errors but nothing so far that solves my issue. Google搜索出现了看似相关的错误,但到目前为止没有任何问题可以解决我的问题。 I have tried both suggestions here and neither have worked. 在这里尝试了两个建议,但都没有奏效。 I wonder if this could be related to RStudio. 我想知道这是否与RStudio有关。

I had a similar problem with RTools 3.5. 我在RTools 3.5中遇到了类似的问题。
The installer did add C:\\RTools\\bin to the PATH, but it did not add 安装程序确实将C:\\RTools\\bin添加到PATH,但未添加
C:\\RTools\\mingw_64\\bin which apparently did cause some confusion. C:\\RTools\\mingw_64\\bin显然引起了一些混乱。

After adding C:\\RTools\\mingw_64\\bin to the PATH, everything was fine. C:\\RTools\\mingw_64\\bin到PATH之后,一切都很好。

My symptoms were a bit different though: RStudio reported an error when trying to "Install and Restart" my package that RTools were not found, while devtools::find_rtools() reported them to be present. 但是,我的症状有所不同:RStudio尝试“安装并重新启动”我的软件包时报告错误,未找到RTools,而devtools::find_rtools()报告它们存在。

I have a comprehensive answer here for rtools not being recognized thru use of pkgbuild 我有一个全面的答案这里rtools不被认可直通使用pkgbuild

`devtools::install_github(repo)` keeps installing rtools35.exe devtools :: install_github(repo)继续安装rtools35.exe

The code snippet acknowledges the github comment this is posted (helped by r-sig-finance citizens) 该代码段确认了已发布的github评论(由r-sig-finance公民提供帮助)

However, (I can't comment) the error of find_tools() has disappeared but remains in devtools::install_bitbucket() for the new code that was the ultimate target and is in a src/master on BB cloud. 但是,(我无法评论) find_tools() )的错误已消失,但仍是devtools::install_bitbucket()中新代码的最终目标,并且该新代码位于BB云的src / master中。

I unloaded the devtools and installed with remotes 我卸载了devtools并安装了遥控器

unloadNamespace("devtools")
library(remotes)
install_bitbucket(author/repo)

As I said the problem with find_tools is taken care of by pkgbuild loading all items 如我所说, find_tools的问题已由pkgbuild加载所有项目来解决

Try updating RStudio to the latest version. 尝试将RStudio更新到最新版本。

I had this problem after updating Rtools to 3.5 and found that updating RStudio to 1.1.447 fixed it. 将Rtools更新到3.5后,我遇到了这个问题,发现将RStudio更新到1.1.447可以解决此问题。

If that doesn't work, Can you run rstudioapi::versionInfo()$version from inside RStudio and share the output? 如果那不起作用,是否可以从RStudio内部运行rstudioapi::versionInfo()$version并共享输出?

If this isn't your problem I found that RStudio keeps a log - and it helped me isolate this issue. 如果这不是您的问题,我发现RStudio保留了一个日志-它帮助我隔离了此问题。 In my case the file was located in, "C:\\Users\\my_windows_username\\AppData\\Local\\RStudio-Desktop\\log\\rsession-my_windows_username.log" 就我而言,该文件位于“ C:\\ Users \\ my_windows_username \\ AppData \\ Local \\ RStudio-Desktop \\ log \\ rsession-my_windows_username.log”

I found this warning in the log time that corresponed to the error in RStudio 我在与RStudio中的错误相对应的日志时间中发现了此警告

WARNING Unknown Rtools version: 3.5; 警告未知的Rtools版本:3.5; LOGGED FROM: rstudio::core::Error rstudio::core::r_util::scanRegistryForRTools(HKEY, bool, std::vector*) C:\\Users\\Administrator\\rstudio\\src\\cpp\\core\\r_util\\RToolsInfo.cpp:269 从以下位置记录:rstudio :: core :: Error rstudio :: core :: r_util :: scanRegistryForRTools(HKEY,bool,std :: vector *)C:\\ Users \\ Administrator \\ rstudio \\ src \\ cpp \\ core \\ r_util \\ RToolsInfo。 CPP:269

This indicated that RStudio didn't recognize 3.5, which led me to check for an updated version of RStudio. 这表明RStudio无法识别3.5,这使我不得不检查RStudio的更新版本。

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

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