I am having this problem while installing pocketsphinx in python3
I'm using anaconda3, windows 10 .
pip install --upgrade pocketsphinx
Below is the error which I got while installing 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 /home/geek/anaconda3/bin/python -u -c
"import setuptools, tokenize;__file__='/tmp/pip-build-k634wg4p
/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
/tmp/tmp6ts477xjpip-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 -python -modern -Ideps/sphinxbase/include -Ideps/sphinxbase/include
/sphinxbase -Ideps/sphinxbase/include/android -Ideps/sphinxbase/swig-
outdir sphinxbase -o swig/sphinxbase/ad_wrap.c swig/sphinxbase/ad.i
unable to execute 'swig': No such file or directory
error: command 'swig' failed with exit status 1
----------------------------------------
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 /home/geek/anaconda3/bin/python -u -c
"import
setuptools, tokenize;__file__='/tmp/pip-build-k634wg4p/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
/tmp/pip-q7w8xgtz-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 -python -modern -Ideps/sphinxbase/include -Ideps/sphinxbase/include
/sphinxbase -Ideps/sphinxbase/include/android -Ideps/sphinxbase/swig
-outdir sphinxbase -o swig/sphinxbase/ad_wrap.c swig/sphinxbase/ad.i
unable to execute 'swig': No such file or directory
error: command 'swig' failed with exit status 1
Please help me to get out of this.
Try this command:
sudo apt-get install swig
It installs swig, which is one of the requirements of pocketsphinx.