Hi Dokken
petsc can be installed now from pip (not sure when it started but its since at least a year)
it works well with fenics (on debian 10 at least)
sudo pip3 -E install petsc slepc slepc4py petsc4py
this has always worked flawlessly for me you can change the PETSC_CONFIGURE_OPTIONS to get different variations - eg this is what I am using
export PETSC_CONFIGURE_OPTIONS=’–download-mumps=1 --download-openblas=1 --download-scalapack=1 --download-hypre=1 --download-suitesparse=1 --download-ptscotch=1 ’
I usually remove the distribution petsc first but in theory you can get them to coexist - I think sudo pip -E is not recommended , pipenv is probably better - but I never had the time to try it