How to install pocketsphinx in python?

How to install pocketsphinx in python? I did everything as described here, but still an error occurs.

C:\Users\Andrei\AppData\Local\Programs\Python\Python35-32>pip install --upgrade pocketsphinx
Collecting pocketsphinx
  Using cached pocketsphinx-0.1.3.zip
Building wheels for collected packages: pocketsphinx
  Running setup.py bdist_wheel for pocketsphinx ... error
  Complete output from command c:\users\andrei\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Andrei\\AppData\\Local\\Temp\\pip-build-ac2xos32\\pocketsphinx\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\Andrei\AppData\Local\Temp\tmp5dtckdk4pip-wheel- --python-tag cp36:
  running bdist_wheel
  running build_ext
  building 'sphinxbase._ad' extension
  swigging swig/sphinxbase/ad.i to swig/sphinxbase/ad_wrap.c
  swig.exe -python -modern -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/win32 -Ideps/sphinxbase/swig -outdir sphinxbase -o swig/sphinxbase/ad_wrap.c swig/sphinxbase/ad.i
  error: command 'swig.exe' failed: No such file or directory

  ----------------------------------------
  Failed building wheel for pocketsphinx
  Running setup.py clean for pocketsphinx
Failed to build pocketsphinx
Installing collected packages: pocketsphinx
  Running setup.py install for pocketsphinx ... error
    Complete output from command c:\users\andrei\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Andrei\\AppData\\Local\\Temp\\pip-build-ac2xos32\\pocketsphinx\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Andrei\AppData\Local\Temp\pip-a0wfgah_-record\install-record.txt --single-version-externally-managed --compile:
    running install
    running build_ext
    building 'sphinxbase._ad' extension
    swigging swig/sphinxbase/ad.i to swig/sphinxbase/ad_wrap.c
    swig.exe -python -modern -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/win32 -Ideps/sphinxbase/swig -outdir sphinxbase -o swig/sphinxbase/ad_wrap.c swig/sphinxbase/ad.i
    error: command 'swig.exe' failed: No such file or directory

    ----------------------------------------
Command "c:\users\andrei\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Andrei\\AppData\\Local\\Temp\\pip-build-ac2xos32\\pocketsphinx\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Andrei\AppData\Local\Temp\pip-a0wfgah_-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Andrei\AppData\Local\Temp\pip-build-ac2xos32\pocketsphinx\
Author: MSDN.WhiteKnight, 2018-03-04

2 answers

I managed to install pocketsphinx by downloading the installer from here.

 0
Author: tutaf, 2018-03-06 19:03:14

I downloaded it in a different way, and I got

pip install pipwin
pipwin install pyaudio
pipwin install pocketsphinx
 0
Author: lev, 2020-11-18 10:41:42