OHDSI Home | Forums | Wiki | Github

HADES install - github download failure

I’m an R novice attempting to install HADES following the instructions at Installing HADES. I have the github PAT configured as directed and I quit RStudio and restarted after doing so. Can anyone give me a hint what the problem is?

R version 4.3.1 (2023-06-16 ucrt) – “Beagle Scouts”

Failure output:

> install.packages("remotes")
--- Please select a CRAN mirror for use in this session ---
trying URL 'https://repo.miserver.it.umich.edu/cran/bin/windows/contrib/4.3/remotes_2.4.2.1.zip'
Content type 'application/octet-stream' length 398531 bytes (389 KB)
downloaded 389 KB

package ‘remotes’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
        C:\Users\jt365\AppData\Local\Temp\RtmpwbqtrL\downloaded_packages
> library(remotes)
> install_github("ohdsi/Hades", upgrade = "always")
Using github PAT from envvar GITHUB_PAT
Downloading GitHub repo ohdsi/Hades@HEAD
Error in utils::download.file(url, path, method = method, quiet = quiet,  : 
  download from 'https://api.github.com/repos/ohdsi/Hades/tarball/HEAD' failed

Please disregard. I chose a different CRAN mirror and installation appears to be succeeding.

And now I’m back. HADES installation did not complete. Can anyone advise this R novice how to address this error?

Using github PAT from envvar GITHUB_PAT
Downloading GitHub repo ohdsi/Hades@HEAD
CohortMethod (NA -> e174be339...) [GitHub]
SelfContr... (NA -> 28cd3a6cb...) [GitHub]
Downloading GitHub repo ohdsi/CohortMethod@HEAD
Error: Failed to install 'Hades' from GitHub:
  Failed to install 'CohortMethod' from GitHub:
  Could not find tools necessary to compile a package
Call `pkgbuild::check_build_tools(debug = TRUE)` to diagnose the problem.
> 

If I try following the debug advice, I get:

> pkgbuild::check_build_tools(debug = TRUE)
Error: Could not find tools necessary to compile a package
Call `pkgbuild::check_build_tools(debug = TRUE)` to diagnose the problem.

Note that I followed the instructions on the HADES installation page, which start with this command, which may be contributing to the failure?

options(install.packages.compile.from.source = "never")

It seems CohortMethod failed to install.

If you run install_github(“ohdsi/CohortMethod”) do you get a more informative message?

Thank you. I should have reported that I had tried that:

> install_github("ohdsi/CohortMethod") 
Using github PAT from envvar GITHUB_PAT
Downloading GitHub repo ohdsi/CohortMethod@HEAD
Error: Failed to install 'CohortMethod' from GitHub:
  Could not find tools necessary to compile a package
Call `pkgbuild::check_build_tools(debug = TRUE)` to diagnose the problem.
>

Looks like devtools (or rtools) was not installed. It contains the compiler and build tools required to install some packages.

https://cran.r-project.org/bin/windows/Rtools/rtools43/rtools.html

Did you have this installed?

@jmethot there is a prior guide here that details the full set up required for your platform that should help resolve this and other issues.

Thank you all. I had installed RTools, so I looked up how to verify installation and found this post that told me to check my PATH. My RStudio PATH contained c:\rtools43, but this page

https://ohdsi.github.io/Hades/rSetup.html

had told me to install rtools42. So RTools was installed but not on my PATH due to version mismatch.

Now I’ve installed rtools43 and all is well. Thanks again for your help.

t