19b92b1d3SBarry Smith(doc_install)= 29b92b1d3SBarry Smith 39b92b1d3SBarry Smith# Install 49b92b1d3SBarry Smith 59b92b1d3SBarry Smith:::{note} 69b92b1d3SBarry SmithPETSc is available from multiple package managers. 79b92b1d3SBarry SmithDepending on your exact needs (for example limited use of {any}`external packages <doc_externalsoftware>`) they are possibly the easiest way for 89b92b1d3SBarry Smithyou to install PETSc. 99b92b1d3SBarry SmithAlways verify that the package manager is providing a recent enough release of PETSc with support for the external packages you need. 109b92b1d3SBarry SmithSome package managers provide separate packages for the complex number installation of PETSc. 119b92b1d3SBarry Smith 129b92b1d3SBarry Smith- Archlinux <https://aur.archlinux.org/packages/petsc> 139b92b1d3SBarry Smith- Conda: <https://anaconda.org/conda-forge/petsc> 149b92b1d3SBarry Smith : `conda install -c conda-forge petsc` 159b92b1d3SBarry Smith- Debian: <https://packages.debian.org/petsc-dev> 169b92b1d3SBarry Smith : `sudo apt install petsc-dev` 179b92b1d3SBarry Smith- Fedora: <https://packages.fedoraproject.org/pkgs/petsc/petsc> 189b92b1d3SBarry Smith : `sudo yum install petsc-mpich-devel` 199b92b1d3SBarry Smith- Homebrew: <https://formulae.brew.sh/formula/petsc> 209b92b1d3SBarry Smith : `brew install petsc` 219b92b1d3SBarry Smith- MacPorts: <https://ports.macports.org/port/petsc> 229b92b1d3SBarry Smith : `sudo port install petsc` 239b92b1d3SBarry Smith- MSYS2 (Windows) <https://packages.msys2.org/package/mingw-w64-x86_64-petsc> 249b92b1d3SBarry Smith- openSUSE <https://software.opensuse.org/package/petsc> 259b92b1d3SBarry Smith- Python: <https://pypi.org/project/petsc> 26*6e8294f6SStefano Zampini : `python -m pip install petsc petsc4py` 279b92b1d3SBarry Smith- Slackware: <https://slackbuilds.org/repository/15.0/academic/petsc/?search=petsc> 289b92b1d3SBarry Smith- Spack: <https://spack.io> 299b92b1d3SBarry Smith : - debug install - `spack install petsc +debug` 309b92b1d3SBarry Smith - 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'` 319b92b1d3SBarry Smith - install with some external packages - `spack install petsc +superlu-dist +metis +hypre +hdf5` 329b92b1d3SBarry Smith - list available variants (configurations) - `spack info petsc` 339b92b1d3SBarry Smith- Ubuntu: <https://packages.ubuntu.com/petsc-dev> 349b92b1d3SBarry Smith : `sudo apt install petsc-dev` 359b92b1d3SBarry Smith::: 369b92b1d3SBarry Smith 379b92b1d3SBarry SmithInformation and tutorials on setting up a PETSc installation. 389b92b1d3SBarry Smith 399b92b1d3SBarry Smith```{toctree} 409b92b1d3SBarry Smith:maxdepth: 2 419b92b1d3SBarry Smith 429b92b1d3SBarry Smithdownload 439b92b1d3SBarry Smithinstall_tutorial 449b92b1d3SBarry Smithinstall 459b92b1d3SBarry Smithwindows 469b92b1d3SBarry Smithmultibuild 479b92b1d3SBarry Smithexternal_software 489b92b1d3SBarry Smithlicense 499b92b1d3SBarry Smith``` 50