Catalyst Python example Import Error no module named mpi4py

Hi all! I’ve been trying to run the catalyst python full example but keep running into the same error.

I ran:
<local>/superbuild/catalyst/build/bin/pvpython fedriver.py cpscript.py

I got:

Traceback (most recent call last):
  File "fedriver.py", line 19, in <module>
    from mpi4py import MPI
ImportError: No module named mpi4py

I built catalyst from the superbuild (version 5.6.2), and I added environment variables to PATH as according to the instructions at the top of the python example (in fedriver.py). This alleviated my problems with numpy, but oddly enough not mpi.

Any help would be appreciated, thank you in advance!

@nicolas.vuaille

Did you enable the MPI option in the ParaView superbuild? If you did, you may need to run pvpython with the --mpi flag or alternately run with pvbatch instead.

I enabled catalyst, cxx11, mpi, numpy, png, and python in the superbuild, but not use system mpi.
I got the same import error with pvbatch and using the --mpi flag with pvpython.

I’m not at a place where it’s easy for me to check on the superbuild options but is there an mpi4py CMake option in the superbuild? It may be an advanced option. Also, are you using your system’s Python? I can’t remember all of the details with Python in the superbuild.

I’m using the 5.6.2 version of catalyst and there’s no mpi4py option during CMake. I didn’t enable USE_SYSTEM_python, so I believe it’s using the superbuild’s python.