xref: /petsc/doc/install/index.md (revision ac84dfd5778759083efa0c46d3820bac8a11500e)
1(doc_install)=
2
3# Install
4
5:::{note}
6PETSc is available from multiple package managers.
7Depending on your exact needs (for example limited use of {any}`external packages <doc_externalsoftware>`) they are possibly the easiest way for
8you to install PETSc.
9Always verify that the package manager is providing a recent enough release of PETSc with support for the external packages you need.
10Some package managers provide separate packages for the complex number installation of PETSc.
11
12- Archlinux <https://aur.archlinux.org/packages/petsc>
13- Conda: <https://anaconda.org/conda-forge/petsc>
14  : `conda install -c conda-forge petsc`
15- Debian: <https://packages.debian.org/petsc-dev>
16  : `sudo apt install petsc-dev`
17- Fedora: <https://packages.fedoraproject.org/pkgs/petsc/petsc>
18  : `sudo yum install petsc-mpich-devel`
19- Homebrew: <https://formulae.brew.sh/formula/petsc>
20  : `brew install petsc`
21- MacPorts: <https://ports.macports.org/port/petsc>
22  : `sudo port install petsc`
23- MSYS2 (Windows) <https://packages.msys2.org/package/mingw-w64-x86_64-petsc>
24- openSUSE <https://software.opensuse.org/package/petsc>
25- Python: <https://pypi.org/project/petsc>
26  : `python -m pip install petsc petsc4py`
27- Slackware: <https://slackbuilds.org/repository/15.0/academic/petsc/?search=petsc>
28- Spack: <https://spack.io>
29  : - debug install - `spack install petsc +debug`
30    - optimized install -`spack install petsc cflags='-g -O3 -march=native -mtune=native' fflags='-g -O3 -march=native -mtune=native'  cxxflags='-g -O3 -march=native -mtune=native'`
31    - install with some external packages - `spack install petsc +superlu-dist +metis +hypre +hdf5`
32    - list available variants (configurations) - `spack info petsc`
33- Ubuntu: <https://packages.ubuntu.com/petsc-dev>
34  : `sudo apt install petsc-dev`
35:::
36
37Information and tutorials on setting up a PETSc installation.
38
39```{toctree}
40:maxdepth: 2
41
42download
43install_tutorial
44install
45windows
46multibuild
47external_software
48license
49```
50