Installing pocketsphinx python module: command 'swig.exe' failed

前端 未结 8 1503
-上瘾入骨i
-上瘾入骨i 2020-12-19 00:40

I\'m getting something like this. Can anyone please tell me how to fix this.

C:\\Users\\krush\\Documents\\ML using Python>pip install pocketsphinx
Collect         


        
8条回答
  •  无人及你
    2020-12-19 00:59

    You try to install pocketsphinx with pip, that will download and compile this module. It requires some compiling tool like swig.

    Another solution is to install a binary version of pocketsphinx. You can download a binary version here. You have to select the correct version with respect to your installation.

    To determine which one you have to download, you can run the following commands, that will tell you which version you require and whether you run a 32 or 64 bit python interpreter.

    "C:\Users\krush\Anaconda3\python.exe" --version
    "C:\Users\krush\Anaconda3\python.exe" -c "import struct;print(struct.calcsize('P') * 8)"
    

    Below are some commands that you may enter once you have downloaded the correct version

    "C:\Users\krush\Anaconda3\python.exe" -m pip install pocketsphinx‑0.1.3‑cp35‑cp35m‑win32.whl
    "C:\Users\krush\Anaconda3\python.exe" -m pip install pocketsphinx‑0.1.3‑cp36‑cp36m‑win_amd64.whl
    

提交回复
热议问题