You seem to be getting that error since you are directly installing pysph with pip. Some dependencies need to be installed before this.
Installing dependencies on ubuntu is relatively easy and is well explained in the installation guide:
https://pysph.readthedocs.io/en/latest/installation.html#installing-the-dependencies-on-gnu-linux . Knowing about the dependencies would enable you to fix some issues yourself when they arise. Please follow this.
Given below is a list of commands that I used to install PySPH on Ubuntu 22.04LTS a couple of weeks ago. I strongly recommend that you follow the installation guide and refer to the below commands
only if you get stuck somewhere.
python3 -m venv pysph_env
source pysph_env/bin/activate
sudo apt-get install build-essential python3-venv python3-pip libomp-dev git
sudo apt-get install openmpi-bin libopenmpi-dev libtrilinos-zoltan-dev
export ZOLTAN_INCLUDE=/usr/include/trilinos
export ZOLTAN_LIBRARY=/usr/lib/x86_64-linux-gnu
export USE_TRILINOS=1
python3 -m pip install --upgrade pip setuptools wheel
python3 -m pip install numpy cython h5py matplotlib mpi4py
python3 -m pip install
https://github.com/pypr/cyarray/zipball/masterpython3 -m pip install
https://github.com/pypr/compyle/zipball/master