You are here: Home / Help / FAQ / Mistral / I want to add my own packages to Python or R but they won't compile

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 their own 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 to build them. This is usually the compiler which was used by DKRZ to build the underlying Python or R. Therefore, you have to load the module for that compiler.

Say, you want to build a package for r/3.5.3, then you also have to load gcc/4.8.2. You can verify this by looking into the module for r/3.5.3.

% module load r/3.5.3 gcc/4.8.2
% module show r/3.5.3 ------------------------------------------------------------------- /sw/rhel6-x64/Modules/r/3.5.3:

module-whatis     r 3.5.3 conflict     r
prepend-path     PATH /sw/rhel6-x64/r/r-3.5.3-gcc48/bin prepend-path     MANPATH /sw/rhel6-x64/r/r-3.5.3-gcc48/share/man -------------------------------------------------------------------

Note the gcc48 in prepend-path. It is important to stay with one compiler and not mix packages compiled with different compilers.

Document Actions