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
-
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 path -
Open
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.
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
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.