Install 'tigerstats' package on databricks

Viewed 260

Hi I can't install tigerstats package on databricks. Below is my code in R.

devtools::install_github("homerhanumat/tigerstats")

But I get the following error enter image description here

My databricks runtime version is "10.0 (includes Apache Spark 3.2.0, Scala 2.12)"

2 Answers

That error show that depended packages are not installed. That way it is working:

install.packages("tigerstats", dependencies=TRUE)

enter image description here

The problem is in the dependencies of dependencies, primarily dependency on the native Linux libraries. For example, jpeg library depends on the libjpeg-dev package, and terra depends on more of them. So you need to find all dependencies & install all of them because they aren't installed by default. The installation method depends on if you're doing this once, or you need to have reproducible setup.

For quick and dirty approach you can use %sh command, but it will install package only on the driver node, so it will work only for single node clusters:

%sh apt-get -f install -y libjpeg-dev

If you have multi-node cluster, then you need to put these installation commands into a cluster init script so they will be executed on every node.

Related