15808f684SSatish BalayInstallation 25808f684SSatish Balay============ 3*eaf87d4bSBarry Smith.. _petsc4py_install: 45808f684SSatish Balay 5*eaf87d4bSBarry Smith 6*eaf87d4bSBarry SmithUsing **pip** 7*eaf87d4bSBarry Smith------------- 85808f684SSatish Balay 95808f684SSatish BalayYou can use :program:`pip` to install :mod:`petsc4py` and its 105808f684SSatish Balaydependencies (:mod:`mpi4py` is optional but highly recommended):: 115808f684SSatish Balay 12*eaf87d4bSBarry Smith $ python -m pip install [--user] numpy mpi4py (or pip install [--user] numpy mpi4py) 13*eaf87d4bSBarry Smith $ python -m pip install [--user] petsc petsc4py (or pip install [--user] petsc petsc4py) 145808f684SSatish Balay 15*eaf87d4bSBarry SmithIf you already have downloaded PETSc simply add the option --download-petsc4py to the ./configure command you use for building PETSc. 165808f684SSatish Balay 17*eaf87d4bSBarry SmithNote that though the command has --download it doesn't actually download anything, it uses the source 18*eaf87d4bSBarry Smithin the directory src/binding/petsc4py. 195808f684SSatish Balay 205808f684SSatish Balay 21