| Both sides previous revision Previous revision Next revision | Previous revision |
| habrok:software_environment:python [2026/04/07 13:01] – pedro | habrok:software_environment:python [2026/04/07 16:10] (current) – [Quick links] pedro |
|---|
| ===== What is different about Python on the cluster? ===== | ===== What is different about Python on the cluster? ===== |
| |
| On your own laptop, you might install Python packages directly with ''pip install'' or ''conda install'' , but on the cluster things work a little differently: | On your own laptop, you might install Python packages directly with ''pip install'' or ''mamba install'' , but on the cluster things work a little differently: |
| | |
| * Python is provided through the **[[habrok:software_environment:module_system|module system]]**, which gives you access to several different versions of Python as well as a number of pre-built, performance-optimised libraries. You should always start by loading a Python module rather than relying on any system Python. | * Python is provided through the **[[habrok:software_environment:module_system|module system]]**, which gives you access to several different versions of Python as well as a number of pre-built, performance-optimised libraries. You should always start by loading a Python module rather than relying on any system Python. |
| * **[[.:python:environments#pip_venv|pip + venv]]** — The standard Python approach. Built into Python itself, no extra installation needed. Recommended for most users who just need to install a set of Python packages. | * **[[.:python:environments#pip_venv|pip + venv]]** — The standard Python approach. Built into Python itself, no extra installation needed. Recommended for most users who just need to install a set of Python packages. |
| * **[[.:python:uv|uv]]** — A modern, fast alternative to pip + venv that also handles project management. | * **[[.:python:uv|uv]]** — A modern, fast alternative to pip + venv that also handles project management. |
| * **[[.:python:mamba|Mamba]]** — A separate environment and package manager that can also manage non-Python dependencies. While installation instructions are available, we generally discourage its use on Hábrók and recommend using pip + venv or uv instead. | * **[[.:python:mamba|Mamba]]** — An alternative to Anaconda, which itself is a separate environment and package manager that can also manage non-Python dependencies. While installation instructions are available, we generally discourage its use on Hábrók and recommend using pip + venv or uv instead. |
| | |
| | |
| How to write job scripts that use your Python environment on the cluster. Covers single-CPU jobs, multi-CPU jobs using multiprocessing, GPU jobs, and multi-node MPI jobs. | How to write job scripts that use your Python environment on the cluster. Covers single-CPU jobs, multi-CPU jobs using multiprocessing, GPU jobs, and multi-node MPI jobs. |
| | |
| | **[[habrok:examples:vscode_python|Python in VSCode]]**\\ |
| | How to use Python modules in VScode. |
| | |
| **[[habrok:examples:jupyter|Jupyter Notebooks]]**\\ | **[[habrok:examples:jupyter|Jupyter Notebooks]]**\\ |
| How to run Jupyter notebooks on Hábrók, either through the web portal or via an SSH tunnel to a compute node running a batch job. | How to run Jupyter notebooks on Hábrók, either through the web portal or via an SSH tunnel to a compute node running a batch job. |
| **[[habrok:examples:spyder|Spyder]]**\\ | **[[habrok:examples:spyder|Spyder]]**\\ |
| How to install and run Spyder, a graphical Python IDE for scientific work, using a remote desktop session on the web portal. | How to install and run Spyder, a graphical Python IDE for scientific work, using a remote desktop session on the web portal. |
| | |
| **[[habrok:examples:vscode_python|Python in VSCode]]**\\ | |
| How to use Python modules in VScode. | |
| |
| ===== Python FAQs ===== | ===== Python FAQs ===== |