在 conda 环境下 pip install mpi4py 安装 mpi4py 库时出现编译报错,报错信息为:
line 301: x86_64-conda_cos6-linux-gnu-cc: command not found
failure.
removing: _configtest.c _configtest.o
error: Cannot compile MPI programs. Check your configuration!!!
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for mpi4py
Failed to build mpi4py
ERROR: Could not build wheels for mpi4py, which is required to install pyproject.toml-based projects
所以导致该错误的原因是
x86_64-conda_cos6-linux-gnu-cc: command not found
即没有找到 x86_64-conda_cos6-linux-gnu-cc。只需执行以下命令安装即可:
conda install gcc_linux-64
安装完成后重新执行
在conda环境下使用pip安装mpi4py时遇到编译错误,错误信息表明缺少wheel。解决方法是先安装 wheel 包,然后重新尝试安装 mpi4py。安装wheel后,mpi4py能成功安装。
订阅专栏 解锁全文
2188

被折叠的 条评论
为什么被折叠?



