Jan Dornhege
Jan Dornhege

Reputation: 29

ERROR: Failed building wheel for pocketsphinx while trying to install pocketsphinx with pip

I'm trying to install pocketsphinx and get following error:

jandornhege@JanDornhegeUbuntu:~/Hermes/Basefunktions$ pip install pocketsphinx
Collecting pocketsphinx
  Using cached https://files.pythonhosted.org/packages/cd/4a/adea55f189a81aed88efa0b0e1d25628e5ed22622ab9174bf696dd4f9474/pocketsphinx-0.1.15.tar.gz
Building wheels for collected packages: pocketsphinx
  Building wheel for pocketsphinx (setup.py) ... error
  ERROR: Complete output from command /home/jandornhege/anaconda3

.....

  deps/sphinxbase/src/libsphinxad/ad_pulse.c:44:10: fatal error: pulse/pulseaudio.h: Datei oder Verzeichnis nicht gefunden
   #include <pulse/pulseaudio.h>
            ^~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for pocketsphinx

Upvotes: 2

Views: 3498

Answers (2)

DanielML
DanielML

Reputation: 53

This happends pretty commonly. Try:

sudo apt-get install pulseaudio swig libpulse-dev

Those three are the ones I see commonly missing. If you are still getting an error, try installing the other packages that @phd mentioned.

Upvotes: 2

phd
phd

Reputation: 94473

Ubuntu installation requirements:

sudo apt-get install -qq python python-dev python-pip build-essential swig git libpulse-dev libasound2-dev

Upvotes: 5

Related Questions