Bob
Bob

Reputation: 10815

Python install mpi4py.MPI

I am trying to install mpi4py as described in the guide. When I do

python setup.py build --mpicc=/usr/bin/mpicc 

(or even without last argument), I get following error:

building 'mpi4py.MPI' extension
/usr/bin/mpicc -fPIC -Wno-unused-result -Werror=declaration-after-statement -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -I/usr/include/python3.4m -c src/MPI.c -o build/temp.linux-i686-3.4/src/MPI.o
In file included from src/MPI.c:3:0:
src/mpi4py.MPI.c:8:22: fatal error: pyconfig.h: No such file or directory
 #include "pyconfig.h"
                      ^
compilation terminated.
error: command '/usr/bin/mpicc' failed with exit status 1

What might be the problem?

Upvotes: 0

Views: 6478

Answers (1)

Hackaholic
Hackaholic

Reputation: 19763

may be you need to install python-dev:

sudo apt-get install python-dev

using pip:

sudo apt-get install pip
sudo pip install mpi4py

you can install it using apt-get directly:

sudo apt-get install python-mpi4py

Upvotes: 2

Related Questions