Failed to build numpy wheel

Hi,

I’m following the installation instructions for this project: https://github.com/dbieber/GoNoteGo/blo … llation.md

Following on from previous advice this project is built for pi os buster python 3.7

I have been successful getting up to step 4 with minor extra step defining setup tools so that the error of a flat structure is resolved and activating the virtualenv

However when I run the command ./env/bin/pip install -e .

It installs up to building the numpy wheel when this error occcurs (1000 lines of output

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for numpy
Successfully built GoNoteGo
Failed to build numpy
ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based
projects

[notice] A new release of pip is available: 23.3.1 → 24.0
[notice] To update, run: pip install --upgrade pip

I have consulted the owner but unsure what the error may be as unfamiliar with python

To build numpy, you need to have C and Fortran compilers installed on your system, as well as C headers for your Python version.

You can install these with

sudo apt build-dep python3-numpy

Are you sure you really need a recent version of numpy? If an older version would work, you can simply install the numpy that ships with Buster

sudo apt install python3-numpy

Edit: The latest version of numpy (1.26.x) only advertises support for Python 3.9 or later, so it may not be possible to build for Python 3.7. The most recent numpy that officially supports Python 3.7 is 1.21.6.

You can install it with pip install numpy<1.22.

1 Like