Creating and Using Python Environments on Clipper

Overview

Python environments are isolated installations that allow users to manage project-specific dependencies without affecting other users or projects on the system. They provide several key benefits:

  • Isolation: Each environment maintains its own separate set of Python packages and dependencies
  • Version Control: Different projects can use different versions of Python or packages without conflicts
  • Reproducibility: Environments can be recreated consistently across different systems
  • Security: Changes in one environment don't affect other users or the system Python installation

On Clipper, users have two main options for managing Python environments:

  1. Conda Environments: A comprehensive environment management system that can handle Python and non-Python dependencies
  2. Virtual Environments: A lightweight, built-in Python tool focused specifically on Python package management; Python virtual environments are the recommended way to manage Python projects on the Clipper HPC cluster.

Choose Your Environment Type

Conda Environments
Python Virtual Environments

Best Practices

  1. Project Isolation: Create separate environments for each project to prevent dependency conflicts
  2. Version Control: If using Git, add environment directories to .gitignore
  3. Documentation: Maintain a list of required packages (requirements.txt for virtual environments or environment.yml for Conda)
  4. Regular Updates: Periodically update packages while testing for compatibility

System Information

As of January 2025:

  • Default Python version: 3.9.19 (RHEL 9)
  • Python 3.10.14, 3.11.9 and 3.12.5 available via Lmod modules
  • Miniconda3 version: 24.9.2
  • Miniforge3 version 24.3.0

For requests regarding different Python or Conda versions, contact Academic Research Computing support with your justification.

Was this helpful?
0 reviews