Har*_*son 2 python installation ubuntu mpi mpi4py
我试图在Ubuntu服务器上安装MPI和mpi4py,以测试我在我的mac上运行的一些python代码.我从源代码安装了OpenMPI,然后下载了mpi4py的tar并尝试运行python setup.py build.然而它失败了:
src/mpi4py.MPI.c:8:22: fatal error: pyconfig.h: No such file or directory
#include "pyconfig.h"
^
compilation terminated.
error: command '/usr/local/bin/mpicc' failed with exit status 1
Run Code Online (Sandbox Code Playgroud)
我也试过安装MPICH sudo apt-get install libcr-dev mpich2 mpich2-doc然后运行setup,但它仍然给我同样的错误.
我在互联网上搜索但仍无法弄明白.
我的PATH上有一个我缺少的目录吗?
编辑:经过一些搜索后,似乎pyconfig.h应该在/usr/include/python2.7/.这是我的Mac上的情况,但是,当我ls 的Ubuntu服务器上的目录不包含pyconfig.h时.这是问题吗?