Python environments

The Python Basics tutorial already describes how you can create a Python environment with venv. However, creating this reproducibly and securely is much more complex. With the Python package manager pip, it could look like this, for example:

$ python -m pip install --no-deps --require-hashes ----only-binary=:all:

Dedicated environments (for example with uv or Spack simplify this if you save the files with the specifications, for example with uv.lock or or spack.lock. This way you and others can reproduce your environments.