Using packages

Learning outcomes

  • Practice using the documentation of your HPC cluster

  • Can find and load a Python package module

  • Can determine if a Python package is installed

Why Python packages are important

Python packages are pieces of tested Python code. Prefer using a Python package over writing your own code.

Why software modules are important

Software modules allows users of any HPC cluster to activate their favorite software of any version. This helps to assure reproducible research.

Exercises

Exercise 1: using Python packages

  • login to your HPC cluster

  • load the Python module of the version below

HPC cluster

Python version

Alvis

3.12.3

Bianca

3.12.7

COSMOS

3.11.5

Dardel

3.11.4

Kebnekaise

3.11.3

LUMI

3.11.7

Rackham

3.12.7

Tetralith

3.11.5 (bare)

  • Confirm that the Python package, indicated in the table below, is absent. You can use any way to do so.

HPC cluster

Python package

Alvis

scipy

COSMOS

scipy

Dardel

tensorflow

Kebnekaise

scipy

LUMI

matplotlib

Rackham

tensorflow

Tetralith

scipy

  • Find the software module to load the package. Use either the documentation of the HPC center, or use the module system

  • Load the software module

  • See the package is now present

In all cases, the package is now installed. Well done!