Setting Up R Code Environment for Use Case 5: ERR_CODEENV_UPDATE_FAILED

Options
bkmyt
bkmyt Partner, Registered Posts: 9 Partner

Hi,

I'm trying to set up the R coding environment for Use Case 5, i.e. I need the packages: Dplyr, GGplot2 and GGmap, Forecast, Lubridate, Purr (optional) and Tidyr.

I was able to set up a R coding environment as described in: https://answers.dataiku.com/2889/getting-error-while-setting-new-environment-code-envs-in-dss?show=2889#q2889

I tried to install to required packages via "packages to install", see image:

When clicking on "save and update", I get the Error:

"Environment update failed

ERR_CODEENV_UPDATE_FAILED

/home/dataiku/dataiku-dss-5.0.3/resources/code-envs/r/install-packages-if-needed.sh failed (exit code: 1)"

I assume that only some packages are a problem, e.g. "ggmap", probably as can be seen from the log

Last few lines of the log (unforetunately I cannot post the complete log here):

No version requested for dplyr considering installed version OK:0.8.0.1

No version requested for ggplot2 considering installed version OK:3.1.0

Package not installed: ggmap

Package not installed: forecast

No version requested for lubridate considering installed version OK:1.7.4

Package not installed: purr

No version requested for tidyr considering installed version OK:0.8.2

No version requested for dplyr considering installed version OK:0.8.0.1

No version requested for httr considering installed version OK:1.4.0

No version requested for gtools considering installed version OK:3.8.1

No version requested for IRkernel considering installed version OK:0.8.15

Error: at least one package failed to install required version

In addition: Warning messages:

1: In install.packages(toInstall, "/home/dataiku/dss/code-envs/R/newTestTSA/R.lib", :

installation of package ‘RgoogleMaps’ had non-zero exit status

2: In install.packages(toInstall, "/home/dataiku/dss/code-envs/R/newTestTSA/R.lib", :

installation of package ‘jpeg’ had non-zero exit status

3: In install.packages(toInstall, "/home/dataiku/dss/code-envs/R/newTestTSA/R.lib", :

installation of package ‘ggmap’ had non-zero exit status

4: In install.packages(toInstall, "/home/dataiku/dss/code-envs/R/newTestTSA/R.lib", :

installation of package ‘forecast’ had non-zero exit status

Execution halted

There seem to be some problems with dependencies (taken from log further above):

white.test html

** building package indices

** testing if installed package can be loaded

* DONE (tseries)

ERROR: dependencies ‘RgoogleMaps’, ‘png’, ‘jpeg’ are not available for package ‘ggmap’

* removing ‘/home/dataiku/dss/code-envs/R/newTestTSA/R.lib/ggmap’

ERROR: dependency ‘timeDate’ is not available for package ‘forecast’

* removing ‘/home/dataiku/dss/code-envs/R/newTestTSA/R.lib/forecast’

Best Answer

  • bkmyt
    bkmyt Partner, Registered Posts: 9 Partner
    Answer ✓
    Options

    I think I was able to track down the problem.

    Even though it first looked like a network issue ("can't resolve host name"), I guess it was actually something else that caused the error:

    ggmap depends on the "png" and "jpeg" package, which I was not able to install on the DSS machine ("... is not available for R 3.5.1"), I guess this caused the whole installation to fail. So for "png", i needed to install additional developer tools, in that case


    yum install libpng-devel

    (outside of R on the DSS machine) and for "jpeg" I needed


    yum install libjpeg-turbo-devel

    After these two commands, I was able to install ggmap and somehow also the other packages. Now I'm able to load all the packages in the Jupyter Notebook for R.

Answers

Setup Info
    Tags
      Help me…