I'm trying to install mpi4py using pip install mpi4py, but I'm getting the following error:
error: Cannot find 'mpi.h' header. Check your configuration!!!
Earlier in the same error report I have,
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What might the problem be?
Thanks!
As the error says, there are libraries missing. I solved it by installing libopenmpi-dev package
sudo apt-get install libopenmpi-dev
and then installed the mpi4py using pip
pip install mpi4py
I met with the similar problem and fixed this by firstly
brew install mpich
And then
pip install mpi4py
you can do this:
brew install mpich
then
sudo find / -name mpicc
finally
env MPICC=/yourpath/mpicc pip3 install mpi4py
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With