BYU

Office of Research Computing

Python

Python
Python is a dynamic language, filling a similar role to Perl or other scripting languages.

Python is well suited to do preparation and post-processing for jobs, but is not as suited for high-performance computing as a compiled language like C or Fortran. We do not recommend that users use it for a major component of their HPC jobs. We do recommend using it for preparation, post-processing, and proof-of-concept work for defining algorithms.

Miniforge3 / Conda / Mamba

The best way to get a particular Python version and associated libraries is to use the conda/mamba package manager, which is already installed on the supercomputer. For more information on conda, refer to our page on conda environments.

Available Versions

Using modules we have several full-featured versions available. A current list of Python versions (and other software) can be found by running this command:

module avail python

To load Python using modules:

# load Python 3.9.x
module load python/3.9

# switch to Python 3.11.x
module swap python/3.11

Using "pip"

Before installing any Python libraries, always create a dedicated conda/mamba environment. This ensures a clean, isolated workspace and prevents conflicts between packages.

Avoid using pip unless absolutely necessary. Most libraries can and should be installed with mamba for better dependency management and stability. Only resort to pip if a required package isn't available via mamba, and do this after installing all other core dependencies.

This approach ensures a more reliable and reproducible Python environment, avoiding version conflicts and dependency issues.

JupyterLab

Jupyter

Please refer to JupyterLabs on OnDemand