Installation
The best way to install Polars is to do so inside a Python virtual environment. For this course, we will use a JupyterHub running on a training cluster which is already setup with Polars, so this information is for your future reference only.
Personal computer
Traditional approach
python -m venv ~/env # Create virtual env
source ~/env/bin/activate # Activate virtual env
pip install --upgrade pip # Update pip
pip install polars # Install PolarsWith uv
A newer and much faster approach to install Python packages now is to use uv:
uv init --bare # Initiate project
uv add polars # Install PolarsAlliance clusters
First, load the Python module of your choice.
Example:
module load python/3.14.2Wheels are available for Polars (always prefer wheels when possible).
python -m venv ~/env # Create virtual env
source ~/env/bin/activate # Activate virtual env
pip install --upgrade pip --no-index # Update pip from wheel
pip install polars --no-index # Install Polars from wheelNote that the Alliance clusters do not support uv.