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

Alternatively, a specific CP2K version can be installed with

conda create -n cp2k_env conda-forge::cp2k=2026.2=mpi_openmpi_hea898a9_5

Activate the new conda environment, and then cp2k can be executed

conda activate cp2k_env
cp2k -h -v

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 / Podman

CP2K container images are available from Docker Hub and can be pulled with either Docker or Podman. Podman is recommended, because it is a daemonless container engine that runs containers rootless by default, i.e. without requiring root privileges or membership in a privileged group like the docker group, which is effectively equivalent to root access on the host. Files written to mounted host directories are owned by the invoking user. Its command line interface is compatible with Docker’s.

podman pull docker.io/cp2k/cp2k:latest

or

docker pull cp2k/cp2k:latest

On macOS with Apple Silicon, see Install on macOS for a step-by-step guide.

See also hub.docker.com, podman.io, 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.