2.16 Tips: Software Dependencies

20220814

Most packages depend on other software and that software will need to be installed for the package to be usable. This installation of other software can take some time. If you update the model the software might need to be installed again. And some software is used across multiple packages, and so will need to be installed for each of the packages.

To reduce the amount of re-installing of software we can often install it into our own account or ask a system administrator to install.

For most MLHub packages it is often useful to install dependent software through the operating system (with system administrator privileges), especially those that are identified as system dependencies in MLHUB.yaml. If you have system administrator privilege (generally through the sudo command) then you may want to checkout a package’s MLHUB.yaml file to install those dependencies on the system, rather than per user when they install the MLHub package. For example, if cargo is a system dependency, then with system administrator privileges:

wajig install cargo

R dependencies are automatically installed by mlhub locally for the user if they have not already been installed by the user or available on the system. Such installations do not interfere with other installations of the same software.

Some software dependencies are required for multiple MLHub packages and so can be pre-installed. Any software package listed in the cran section of the MLHUB.yaml file can be installed just once by the user. For example, if rpart and tidyverse are required the user can run the following command:

Rscript -e 'install.packages(c("rpart", "tidyverse"))'

If you have system administration privileges, then you can install the Ubuntu versions of this software:

wajig install r-cran-rpart r-cran-tidyverse

Similarly for common Python dependencies. One particular example is tensorflow which does not have a Ubuntu package and thus is installed using pip. This can be installed any time by a user, and any mlhub package that requires tensorflow will not need to install it separately (unless they require a specific version of tensorflow).

pip install tensorflow


Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0