Pocketsphinx installing error: module 'numpy' has no atribute 'get_include' - raspbian "bullseye"

92 Views Asked by At

I was installing pocketsphinx with pip on my raspberry pi, on Debian 11 - Bullseye, but it crashed. Command:

pip install pocketsphinx

also:

pip3 install pocketsphinx

There are all errors:

ERROR: Command errored out with exit status 1
AtributeError: module 'numpy' has no attribute 'get_include'
------------------------------------------------------------------------------------------------
ERROR: Failed building wheel for pocketsphinx
Failed to build pocketsphinx
ERROR: Could not build wheels for pocketsphinx which use PEP 517 and cannot be installed directly.

And yes, it's the same to pip3.

I just want to install pocketsphinx for my project. Does anybody help?

1

There are 1 best solutions below

0
Palkia On

What worked for me:

sudo pip install numpy --upgrade

'get_include' was only added in ~V1.21 of numpy, and updating to the (current) latest 1.26.3 fixed the issue.

My freshly installed Raspbian Lite (2023-12-05) had version 1.19.5 installed before updating.