前言
最近在做RL项目等时候,发现遇见一个问题
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
想起来这个问题大概几年前也遇见过,但是当时没有做记录,现在做一个记录~。
正文
1. 问题
2. 解决办法
其实解决办法很简单,参考答案《ERROR: Could not build wheels for mpi4py, which is required to install pyproject.toml-based projects》
用conda
安装mpi4py
即可
conda install mpi4py
P.S.: 尽量不要用pip
安装。
总结
conda
环境,就要用conda
的命令。(其实我也不知道为什么会得出这个结论,但是估计我之前用pip
安装了还是报错,用了conda
这个才解决~)
参考
[1] ERROR: Could not build wheels for mpi4py, which is required to install pyproject.toml-based projects
Q.E.D.