Reputation: 383
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.
Upvotes: 15
Views: 37254
Reputation: 1
I had a similar problem, but for me it had additionally something about not finding Python.h
. I recently upgraded python version, and the problem was solved (as described here) via sudo apt-get install python3.X-dev
(in my case X was 10).
Upvotes: 0
Reputation: 1422
I'm using mpich and don't want to install openmpi, but the following worked for me:
pip install mpi4py-mpich
Upvotes: 1
Reputation: 415
I had the same error message. I used the Anaconda-Navigator interface and it worked fine.
Another option is to use brew
. If OpenMPI isn't a dependency issue for you, the installation worked when I used it as well.
brew install mpi4py
Upvotes: 3
Reputation: 383
It seems that related packages are twisted. Installed by following the steps below.
apt --fix-broken install
apt install mpich
pip install mpi4py
Upvotes: 7
Reputation: 149
The following worked for me:
sudo apt update
sudo apt-get install libopenmpi-dev
Upvotes: 14