Error when installing mpi4py

后端 未结 7 2004
死守一世寂寞
死守一世寂寞 2021-02-02 07:19

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!!!
<         


        
7条回答
  •  情话喂你
    2021-02-02 08:00

    If somebody stumbles by and has the same problem I had:

    I wanted to install mpi4py using pip as root:

    sudo pip install mpi4py
    

    I got the error message that mpi.h was missing during the installation. The path was set correctly, but only for my user, not for root. So if you run into trouble with missing libraries/headers during any installation, make sure the correct environment is also set up for root.

    As I use mpi-selector to select which mpi implementation you use, I just had to run mpi-selector as root to set up everything correctly, and the installation succeeded.

提交回复
热议问题