Install from Distribution

The easiest way to get started with CP2K is to install it from a distribution.

Note

The pre-compiled package from distributions may not performs as well as package built from source, as it usually adopts a conservative compilation strategy to ensure broad compatibility.

Arch

$ pacman -S cp2k

See also archlinux.org.

Conda

Download and install conda. The available CP2K versions can be listed with

$ conda search conda-forge::cp2k

It is recommended to select the latest CP2K version and to install it into a new, dedicated conda environment, e.g. cp2k_env, to avoid dependency conflicts.

$ conda create -n cp2k_env conda-forge::cp2k=2026.1

Activate the new conda environment

$ conda activate cp2k_env
$ cp2k -h -v

and run either OpenMP parallel (e.g. with 4 OpenMP threads)

$ export OMP_NUM_THREADS=4
$ cp2k <cp2k.inp>

or MPI/OpenMP parallel CP2K jobs

$ export OMP_NUM_THREADS=2
$ mpiexec -n 4 cp2k <cp2k.inp>

See also conda-forge.org and conda-metadata-app.streamlit.app.

Debian / Ubuntu

$ apt-get install cp2k

See also debian.org and ubuntu.com.

Docker

$ docker pull cp2k/cp2k

See also hub.docker.com and cp2k-containers.

Easybuild

$ eb --software-name=CP2K --toolchain=foss,2023a

See also easybuild.io.

Fedora

$ dnf install cp2k

See also fedoraproject.org

FreeBSD

$ pkg install cp2k

See also freshports.org.

Homebrew

$ brew install cp2k

See also brew.sh.

NixOS

$ nix-shell -p cp2k

See also nixos.org.

Nvidia GPU Cloud

$ docker pull nvcr.io/hpc/cp2k:v2023.2

See also ngc.nvidia.com.

Spack

$ spack install cp2k

See also spack.io and Build with Spack.