【发布时间】:2019-10-12 23:06:28
【问题描述】:
我正在尝试在我的 Ubuntu 18.04 实例上安装 mpi4py。我已经安装了 python3.6.5。
首先我尝试sudo apt-get build-dep python-mpi4py,我得到:
正在阅读包列表...完成 E:您必须在其中放入一些“源”URI 你的sources.list
然后我尝试简单地使用pip install mpi4py 进行安装。我收到一条很长的错误消息,其中包含以下一些最重要的部分:
checking for library 'lmpe' ...
/home/ubuntu/anaconda3/envs/tensorflow_p36/bin/mpicc -pthread -B /home/ubuntu/anaconda3/envs/tensorflow_p36/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -c _configtest.c -o _configtest.o
--------------------------------------------------------------------------
The Open MPI wrapper compiler was unable to find the specified compiler
x86_64-conda_cos6-linux-gnu-cc in your PATH.
Note that this compiler was either specified at configure time or in
one of several possible environment variables.
--------------------------------------------------------------------------
failure.
大多数库都会发生此故障。我只包括其中之一,并且
warning: build_clib: command '/home/ubuntu/anaconda3/envs/tensorflow_p36/bin/mpicc' failed with exit status 1
warning: build_clib: building optional library "vt-mpi" failed
checking for library 'vt-hyb' ...
/home/ubuntu/anaconda3/envs/tensorflow_p36/bin/mpicc -pthread -B /home/ubuntu/anaconda3/envs/tensorflow_p36/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -c _configtest.c -o _configtest.o
--------------------------------------------------------------------------
The Open MPI wrapper compiler was unable to find the specified compiler
x86_64-conda_cos6-linux-gnu-cc in your PATH.
Note that this compiler was either specified at configure time or in
one of several possible environment variables.
运行which mpcc 给出:
(tensorflow_p36) ubuntu@ip-172-31-35-200:~$ which mpicc
/home/ubuntu/anaconda3/envs/tensorflow_p36/bin/mpicc
如何将指定的编译器 x86_64-conda_cos6-linux-gnu-cc 添加到我的 PATH 以解决此错误?
【问题讨论】: