ARCCSS-extremes/climpact2

Won't install on OSX

Closed this issue · 6 comments

I can't get climpact2.r to install under OSX. The 'batch' installer reports everything in place:

source('installers/climpact2.batch.installer.r')
[1]
[1] Checking for required R packages.
[1] ******************************
[1]
[1] This is a unix-based OS, checking for additional R packages.
[1] ******************************
[1] bitops... installed.
[1] Rcpp... installed.
[1] caTools... installed.
[1] PCICt... installed.
[1] SPEI... installed.
[1] climdex.pcic... installed.
[1] foreach... installed.
[1] doParallel... installed.
[1]
[1] ******************************
[1] R version 3.5.0 detected.
[1] Checking complete.

But the actual installer just hangs indefinitely..

It doesn't appear in the Packages list. This is what I get, running the installer:

source('installers/climpact2.ncdf.installer.r')
[1]
[1] ******************************
[1]
Calculating the ClimPACT2 indices on netCDF data requires that PROJ4 and UDUNITS2 be installed on your opreating (sic) system
prior to running this script. If the following R packages fail to install ensure that these two programs are installed.

  • PRESS ENTER TO CONTINUE -<<

Pressing enter doesn't do anything other than throw a line. I tried the 'proper' enter rather than 'return', just in case - no difference.

With no fault reporting or logging I've no idea why it's not working.

Hi Nick,

It doesn't appear to be there:

source("climpact2.ncdf.wrapper.r")
Error in library(climdex.pcic.ncdf) :
there is no package called ‘climdex.pcic.ncdf’

If I use RStudio to run climpact2.ncdf.wrapper, (which I've edited to have the required settings), I get more interesting errors because I have climdex and gridclimind (for ETCCDI) installed, so it's picking up their elements. The command-line work (above) doesn't see those and so the error is simpler.

Ah, I think I cracked it: I commented out the line:

x <- readLines(con="stdin", 1)

..and the installer then runs.

Of course, the first thing it asks is:

'A modified version of climdex.pcic.ncdf needs to be installed. If a version is already installed it will be overwritten.
If you do not install this modified version you will not be able to calculate the indices on netCDF data (but will still
be able to use the GUI). Install the modified version? (y/n)'

..which is just great - because by using the existing ETCCDI package parts by name, the author(s) have created a scenario where I can't do both sets of indices without uninstalling and reinstalling!

I've also had to hardwire the installer to do that, as the readLines calls don't seem to function in OSX land: if they come before, they stifle output to screen; if they come after, it's too late.

Thanks for your help, of course!