Integral Constrains in FEniCSx

The easiest method (in my opinion) is to use conda or docker. I recently installed dolfinx_mpc (inside WSL) using

conda create -n dolfinx_mpc "dolfinx_mpc[build=...]"

where I specified the build that I wanted, in order to get the Python version, MPI implementation, and PETSc scalar types that I wanted. (There are conda builds of dolfinx_mpc for Python 3.8, 3.9, and 3.10, for MPICH and OpenMPI, and for real and complex PETSc.) If you decide to try conda, you may want to remove your current installation first.

If you want to stick with your dolfinx installed through apt, it sounds like there is a package python3-dolfinx-mpc for that. You can find some discussion on how to do that here: Explicitly assembling matrices with dolfinx_mpc - #7 by BillS