Install#
Note
PETSc is available from multiple package managers. Depending on your exact needs (for example limited use of external packages) they are possibly the easiest way for you to install PETSc. Always verify that the package manager is providing a recent enough release of PETSc with support for the external packages you need. Some package managers provide separate packages for the complex number installation of PETSc.
Archlinux https://aur.archlinux.org/packages/petsc
- Conda: https://anaconda.org/conda-forge/petsc
conda install -c conda-forge petsc
- Debian: https://packages.debian.org/petsc-dev
sudo apt install petsc-dev
- Fedora: https://packages.fedoraproject.org/pkgs/petsc/petsc
sudo yum install petsc-mpich-devel
- Homebrew: https://formulae.brew.sh/formula/petsc
brew install petsc
- MacPorts: https://ports.macports.org/port/petsc
sudo port install petsc
MSYS2 (Windows) https://packages.msys2.org/package/mingw-w64-x86_64-petsc
- Python: https://pypi.org/project/petsc
python -m pip install mpi4py petsc petsc4py
Slackware: https://slackbuilds.org/repository/15.0/academic/petsc/?search=petsc
- Spack: https://spack.io
spack install petsc
- Ubuntu: https://packages.ubuntu.com/petsc-dev
sudo apt install petsc-dev
Information and tutorials on setting up a PETSc installation.
- Download
- Quick Start Tutorial
- Configuring PETSc
- Common Example Usages
- Compilers
- External Packages
- BLAS/LAPACK
- MPI Problems/I Don’t Want MPI
- Installing On macOS
- Installation Location: In-place or Out-of-place
- Installing On Machine Requiring Cross Compiler Or A Job Scheduler
- Installing With TAU Instrumentation Package
- Installing PETSc To Use GPUs And Accelerators
- Installing To Run in Browser with Emscripten
- Installing On Large Scale DOE Systems
- Installing PETSc On Microsoft Windows
- Maintaining Your PETSc Installation(s)
- Supported External Software
- License