Python pocketsphinx RequestError: missing PocketSphinx module: ensure that PocketSphinx is set up correctly

You will need these libraries for compiling pocketsphinx:

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

After that it's simple to install pocketsphinx:

sudo pip install pocketsphinx


as @Nikolay Shmyrev mentioned, you can simply

pip install pocketsphinx

to solve the issue


I was trying to do the same thing and had trouble with

# Make sure we have up-to-date versions of pip, setuptools and wheel:
$ pip install --upgrade pip setuptools wheel

$ pip install --upgrade pocketsphinx

from the pocketsphinx docs https://pypi.python.org/pypi/pocketsphinx

The error was

error: command 'gcc' failed with exit status 1

I am working on a mac and needed to install the x-code command line tools. From the command line

xcode-select --install

then the pip install worked and

r.recognize_sphinx(audio)

works