4

I would like to convert grapheme to phoneme. And I want to pip install pocketsphinx to do that. One of its dependency is swig, so I downloaded and placed it in a directory and go to the environment path variable and add the path that leads to swig.exe. When I cmd and type 'swig --help' it seems to be working.

But when I go 'pip install pocketsphinx, it says 'error: command 'swig.exe failed: No such file or directory'.

KubiK888
  • 4,377
  • 14
  • 61
  • 115

2 Answers2

4

You can use pipwin to install it without any issues.

  • Install pipwin [Run as Administrator, if any issues]

pip install pipwin

  • Install pocketsphinx using pipwin

pipwin install pocketsphinx

Note: Works on Windows-10(win32-py3.8) [Tested]

3

You should setup swig in Visual Studio instead of including its path in %PATH%.

Alexander Solovets
  • 2,447
  • 15
  • 22
  • 2
    how abstruse :( – jeromej Mar 22 '17 at 05:37
  • Unfortunately, Windows is not every developer-friendly, so even if I or someone else had posted a step-by-step solution here, it would have quickly become outdated as SWIG is in rapid development. This may change though as we see Windows adopt Linux culture more and more. – Alexander Solovets Mar 22 '17 at 16:34
  • Hopefully. Because for this project I'm stuck with this Windows environment sadly. – jeromej Mar 23 '17 at 23:17
  • @JeromeJ What's your problem? Did you follow the link I provided? – Alexander Solovets Mar 23 '17 at 23:32
  • That was probably on my end. This linked helped me fixing my problem: http://stackoverflow.com/a/36785608/1524913 (now i have another one but it isn't Swig) – jeromej Mar 24 '17 at 01:23