【发布时间】:2014-09-09 20:39:14
【问题描述】:
我正在尝试在 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
我还尝试使用 sudo apt-get install libcr-dev mpich2 mpich2-doc 安装 MPICH,然后运行 setup,但它仍然给我同样的错误。
我已经在网上搜索过,但仍然无法弄清楚。
我的 PATH 上是否缺少目录?
编辑:经过更多搜索后,似乎 pyconfig.h 应该在/usr/include/python2.7/ 中。在我的 Mac 上就是这种情况,但是,当我 ls 我的 Ubuntu 服务器上的目录时,它不包含 pyconfig.h。是这个问题吗?
【问题讨论】:
标签: python ubuntu installation mpi mpi4py