Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR: Could not build wheels for mpi4py, which is required to install pyproject.toml-based projects

I want to install mpi4py. The installation fails with the error below. Please share the solution to the same error.

  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

[notice] A new release of pip available: 22.3 -> 22.3.1
[notice] To update, run: python -m pip install --upgrade pip

I installed pyproject-toml with "pip install pyproject-toml". But mpi4py still won't install. My python version is Python 3.8.0.

like image 316
eve Avatar asked Jan 23 '26 00:01

eve


1 Answers

The following worked for me:

sudo apt update

sudo apt-get install libopenmpi-dev
like image 101
AliMezher18 Avatar answered Jan 26 '26 23:01

AliMezher18