I want to add my own packages to Python or R but they won’t compile#
Python and R, among other scripting languages, allow users to create customized environments including their own set of packages.
For Python you use virtualenv or conda, R can also add locally installed packages.
Some of these packages require a C compiler during installation. This
usually must be the compiler which was used by DKRZ to build the
underlying Python or R. Therefore, you have to additionally load the
module for that compiler. Otherwise, the system gcc compiler from
/usr/bin would be used, and that usually causes the build process
to outright fail or result in subtly defective build.
Say, you want to build a package for
-gcc-11.2.0 in the module name indicates that R was built
with gcc compiler version 11.2.0. Hence you also need to
% module load r/4.1.2-gcc-11.2.0 % module load gcc/11.2.0-gcc-11.2.0
It is important to stay with one compiler and not mix packages compiled with different compilers to prevent inconsistencies.