Installing pocketsphinx python module: command swig.exe failed

Installing pocketsphinx python module: command swig.exe failed

To fix the problem, I downloaded swig for windows

  1. Copy swig.exe to the python installation folder (for ex C:/python27)

  2. Open the swigwin-3.0.12/Lib folder and copy all *.swg files to the C:/python27/Lib or equivalent python path

  3. Open swigwin-3.0.12/Lib/python and copy all the files to C:/python27/Lib

  4. Open the swigwin-3.0.12/Lib folder and copy over the typemaps folder to C:/python27/Lib

(Also make sure you have Microsoft Visual C++ Compiler for Python installed)

These steps worked for me.

Instead of copying Swig files to the Python folder, you can simply add Swig`s location to the environment variables:

  1. Press Ctrl+S
  2. Type env and press Enter
  3. Double click on Path
  4. Add the path-to-Swig to the last blank line
  5. Click OK and restart your PC

Installing pocketsphinx python module: command swig.exe failed

conda install swig
pip install pocketsphinx

I didnt 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.

Leave a Reply

Your email address will not be published. Required fields are marked *