HughParsonage / grattan

Common quantitative tasks for Australian policy analysts
25 stars 8 forks source link

grattan failing to install #195

Closed wfmackey closed 5 years ago

wfmackey commented 5 years ago

The grattan package is failing to install on a system that has not previously installed the package:

R version 3.6.1 (2019-07-05) -- "Action of the Toes"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin15.6.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> remotes::install_github("hughparsonage/grattan")
Downloading GitHub repo hughparsonage/grattan@master
Your system is ready to build packages!
Installing 19 packages: hutils, ineq, rsdmx, fastmatch, forecast, zoo, XML, RCurl, fracdiff, lmtest, timeDate, tseries, urca, RcppArmadillo, bitops, quadprog, quantmod, xts, TTR
Error: Failed to install 'grattan' from GitHub:
  (converted from warning) unable to access index for repository https://hughparsonage.github.io/tax-drat/bin/macosx/el-capitan/contrib/3.6:
  cannot open URL 'https://hughparsonage.github.io/tax-drat/bin/macosx/el-capitan/contrib/3.6/PACKAGES'
> 
> 

The package is also failing to update the package on a system that had it installed, with the same warning:

R version 3.6.0 (2019-04-26) -- "Planting of a Tree"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin15.6.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> remotes::install_github("hughparsonage/grattan")
Downloading GitHub repo hughparsonage/grattan@master
These packages have more recent versions available.
Which would you like to update?

1: All                                                
 2: CRAN packages only                                  
 3: None                                               
 4: forecast     (8.4          -> 8.9         ) [CRAN] 
 5: lmtest       (0.9-36       -> 0.9-37      ) [CRAN] 
 6: tseries      (0.10-45      -> 0.10-47     ) [CRAN] 
 7: RcppArmad... (0.8.600.0.0  -> 0.9.600.4.0 ) [CRAN] 
 8: rlang        (09fbc8618... -> 15e799c57...) [GitHub]
9: vctrs        (6701f7816... -> 1cdd19df1...) [GitHub]
10: quadprog     (1.5-5        -> 1.5-7       ) [CRAN] 
11: quantmod     (0.4-13       -> 0.4-15      ) [CRAN] 
12: xts          (0.11-0       -> 0.11-2      ) [CRAN] 
13: TTR          (0.23-3       -> 0.23-4      ) [CRAN] 

Enter one or more numbers, or an empty line to skip updates:
1
forecast     (8.4          -> 8.9         ) [CRAN]
lmtest       (0.9-36       -> 0.9-37      ) [CRAN]
tseries      (0.10-45      -> 0.10-47     ) [CRAN]
RcppArmad... (0.8.600.0.0  -> 0.9.600.4.0 ) [CRAN]
rlang        (09fbc8618... -> 15e799c57...) [GitHub]
vctrs        (6701f7816... -> 1cdd19df1...) [GitHub]
quadprog     (1.5-5        -> 1.5-7       ) [CRAN]
quantmod     (0.4-13       -> 0.4-15      ) [CRAN]
xts          (0.11-0       -> 0.11-2      ) [CRAN]
TTR          (0.23-3       -> 0.23-4      ) [CRAN]
Installing 8 packages: forecast, lmtest, tseries, RcppArmadillo, quadprog, quantmod, xts, TTR
Installing packages into ‘/Users/mackeyw/Library/R/3.6/library’
(as ‘lib’ is unspecified)
Error: Failed to install 'grattan' from GitHub:
  (converted from warning) unable to access index for repository https://hughparsonage.github.io/tax-drat/bin/macosx/el-capitan/contrib/3.6:
  cannot open URL 'https://hughparsonage.github.io/tax-drat/bin/macosx/el-capitan/contrib/3.6/PACKAGES'
MattCowgill commented 5 years ago

Also fails on my machine:

remotes::install_github("hughparsonage/grattan", dependencies = TRUE)

fails with error:

Error: Failed to install 'grattan' from GitHub: (converted from warning) unable to access index for repository https://hughparsonage.github.io/tax-drat/bin/macosx/el-capitan/contrib/3.6: cannot open URL 'https://hughparsonage.github.io/tax-drat/bin/macosx/el-capitan/contrib/3.6/PACKAGES'

HughParsonage commented 5 years ago

Does

remotes::install_github("hughparsonage/grattan", dependencies = NA, type = "source", upgrade = "never")

work?

MattCowgill commented 5 years ago

That failed several times at various points. Once I'd manually installed various dependencies (with install.packages("future") etc.) it then worked. I'll try on a fresh R install.

HughParsonage commented 5 years ago

Looks like a bug in remotes

On Tue, 27 Aug 2019 at 8:58 am, Matt Cowgill notifications@github.com wrote:

That failed several times at various points. Once I'd manually installed various dependencies (with install.packages("future") etc.) it then worked. I'll try on a fresh R install.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/HughParsonage/grattan/issues/195?email_source=notifications&email_token=AB54MDHMRF3WA7CYSTWDYJDQGRNYNA5CNFSM4IPMAVC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5F5W3Y#issuecomment-525065071, or mute the thread https://github.com/notifications/unsubscribe-auth/AB54MDECQSUZLJBODCWNPR3QGRNYNANCNFSM4IPMAVCQ .

MattCowgill commented 5 years ago

I tried a fresh install on a Windows 10 VM. Same issue - it failed (after about 40 minutes) trying to install a dependency (in this case RCurl).

HughParsonage commented 5 years ago

What was the error message? I can't reproduce on any platform.

FWIW it's not an issue with the grattan package but with the logic of installing dependencies.

What about

install.packages("grattan") remote::install_packages("grattan", upgrade = "never")

On Tue, 27 Aug 2019 at 11:10, Matt Cowgill notifications@github.com wrote:

I tried a fresh install on a Windows 10 VM. Same issue - it failed (after about 40 minutes) trying to install a dependency (in this case RCurl).

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/HughParsonage/grattan/issues/195?email_source=notifications&email_token=AB54MDHTPCTAD7ULRRC6H73QGR5JHA5CNFSM4IPMAVC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5GERSY#issuecomment-525093067, or mute the thread https://github.com/notifications/unsubscribe-auth/AB54MDEHKHE3O3TT5DUR3IDQGR5JHANCNFSM4IPMAVCQ .

MattCowgill commented 5 years ago

This was the error: Screen Shot 2019-08-27 at 10 36 58 am

I think did: install.packages("RCurl")

and repeated:

remotes::install_github("hughparsonage/grattan", dependencies = NA, type = "source", upgrade = "never")

and it worked

HughParsonage commented 5 years ago

OK. The issue is that XML has a libxml2 SystemsRequirements which appears to have been absent on that platform. So you need to install the win.binary or mac.binary version. But if you request a binary on Mac, remotes only looks for mac binaries throughout the tail of dependencies and there is no taxstats mac binary.

IMO remotes should fall back to a source installation if it's available and doesn't require compilation, though packages in AdditionalRepositories appears to be a corner case.

On Tue, 27 Aug 2019 at 11:24, Matt Cowgill notifications@github.com wrote:

This was the error: [image: Screen Shot 2019-08-27 at 10 36 58 am] https://user-images.githubusercontent.com/8002951/63733773-0df45000-c8bd-11e9-8de5-02ba443752c6.png

I think did: install.packages("RCurl")

and repeated:

remotes::install_github("hughparsonage/grattan", dependencies = NA, type = "source", upgrade = "never")

and it worked

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/HughParsonage/grattan/issues/195?email_source=notifications&email_token=AB54MDG6KL6CE5P5O3Q4ZWDQGR63FA5CNFSM4IPMAVC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5GFGKY#issuecomment-525095723, or mute the thread https://github.com/notifications/unsubscribe-auth/AB54MDAPEGXEKTYFH4WELT3QGR63FANCNFSM4IPMAVCQ .

HughParsonage commented 5 years ago

To summarize, to install from GitHub, first install from CRAN then attempt a dependency-less install with no upgrades. That way, there is no attempt by remotes to install Suggested dependencies, in particular taxstats for which the binary not available for Mac.

HughParsonage commented 5 years ago

Did you manage to install it?

In your opinion, do I need to change anything to fix the issue?

MattCowgill commented 5 years ago

yes, it’s working, so I’ll close the issue. In the medium term we’ll try to think of ways to streamline some of the functions and make installation less heavy