Installing pocketsphinx python module: command 'swig.exe' failed
Instead of copying Swig files to the Python folder, you can simply add Swig`s location to the environment variables:
- Press
Ctrl+S
- Type
env
and pressEnter
- Double click on
Path
- Add the path-to-Swig to the last blank line
- Click
OK
and restart your PC
conda install swig
pip install pocketsphinx
I didn't want to do all that setup other people are suggesting so I tried this and it worked. This probably only works if you are using Anaconada though.
To fix the problem, I downloaded swig for windows at the time of writing this answer it was 3.0.12
For the latest swig windows version follow this link
Copy swig.exe to the python installation folder (for ex C:/python27)
Open the
swigwin-3.0.12/Lib
folder and copy all*.swg
files to theC:/python27/Lib
or equivalent python pathOpen
swigwin-3.0.12/Lib/python
and copy all the files toC:/python27/Lib
Open the
swigwin-3.0.12/Lib
folder and copy over thetypemaps
folder toC:/python27/Lib
(Also make sure you have Microsoft Visual C++ Compiler for Python installed)
These steps worked for me.