Hi All,
I'm trying to build the mpi4py package by following the steps give on this page -
https://mpi4py.readthedocs.io/en/stable/install.htmlHere I installed the open_mpi package for mpicc and am using the following command to build -
python setup.py build --mpi=open_mpi
( I have configured the mpi.cfg code as shown for open_mpi)
Here I'm facing the following issue-
src/mpi4py.MPI.c:6:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
Here I tried a hack to copy a Python.h file from this source -
https://github.com/python/cpython/blob/main/Include/Python.hand place it in the src folder before giving the build command, but still I get similar error -
In file included from src/MPI.c:4:0:src/mpi4py.MPI.c:8:6: error: #error Python headers needed to compile C extensions, please install development version of Python. #error Python headers needed to compile C extensions, please install development version of Python. ^error: command '/scratch/user/saurabh_zond/takde_setup/openmpi/bin/mpicc' failed with exit status 1I tried googling this, and it mentions to install developer packages using -
sudo apt-get install python3-dev
Now, I'm running on the college terminal, thus don't have the sudo access to install this.
Is there any roundabout to this problem/ Any Python.h that I can readily use?
Look forward to hear from others.
Regards,
Saurabh Zond