bambocher/pocketsphinx-python

Not able to install

Opened this issue · 4 comments

Hi I tied this..

git clone --recursive https://github.com/cmusphinx/pocketsphinx-python/
cd pocketsphinx-python
python setup.py install

running install
running bdist_egg
running egg_info
writing pocketsphinx.egg-info\PKG-INFO
writing dependency_links to pocketsphinx.egg-info\dependency_links.txt
writing top-level names to pocketsphinx.egg-info\top_level.txt
reading manifest file 'pocketsphinx.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'build'
no previously-included directories found matching 'dist'
writing manifest file 'pocketsphinx.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
running build_ext
building 'sphinxbase._sphinxbase' extension
swigging sphinxbase/swig/sphinxbase.i to sphinxbase/swig/sphinxbase_wrap.c
swig.exe -python -modern -threads -Isphinxbase/include -Isphinxbase/include/sphinxbase -Isphinxbase/include/win32 -outdir sphinxbase/swig/python -o sphinxbase/swig/sphinxbase_wrap.c sphinxbase/swig/sphinxbase.i
error: command 'swig.exe' failed: No such file or directory

I am getting this..

I also added swig to environment and path varibles

Varible name : swig.exe
Varible value: C:\Python37\Lib\swigwin-3.0.12\swig.exe

Please help

I just installed it using a pre-compiled binary wheel. Go to https://www.lfd.uci.edu/~gohlke/pythonlibs/#pocketsphinx and download the wheel for your version of python.. Once downloaded, open CMD with admin rights. use cd to change folders to where the downloaded file is saved. then run pip install the_full_name_of_wheel_file.whl

and that should be it : )

In case the above one doesn't work here is the (more elaborate and painful) way : https://stackoverflow.com/a/48249412/10145519

just installed it using below commands:

apt-get install -y python3 python3-dev python3-pip build-essential swig git libpulse-dev
pip install pocketsphinx

@deeksha004 that's a good solution. Just a heads up to people that the above solution will try to build the wheel from source and the tools needed to do so might be heavy for some use cases (for instance a basic heroku slug, a low spec EC2 instance).

other than that you're fine. Also considering the fact that on a desktop development environment, you'd prolly need the build tools anyways.