库PocketSphinx无法使用pip或二进制文件下载

问题描述 投票:0回答:1

我正在开发语音识别软件,想测试Pocketsphinx,并尝试在Windows 10 python版本3.8上使用pip进行安装,通常它不会下载,我会通过将其下载为二进制文件来解决问题,然后尝试安装它,但它告诉我不支持whl文件,并在此先感谢大家。

下面是我收到的错误消息。

ERROR: Command errored out with exit status 1:
command: 'C:\Users\yeetgod\AppData\Local\Programs\Python\Python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\yeetgod\\AppData\\Local\\Temp\\pip-install-aims1y79\\pocketsphinx\\setup.py'"'"'; __file__='"'"'C:\\Users\\yeetgod\\AppData\\Local\\Temp\\pip-install-aims1y79\\pocketsphinx\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\yeetgod\AppData\Local\Temp\pip-record-fcvz7sp8\install-record.txt' --single-version-externally-managed --compile
         cwd: C:\Users\yeetgod\AppData\Local\Temp\pip-install-aims1y79\pocketsphinx\
    Complete output (6 lines):
    running install
    running build_ext
    building 'sphinxbase._sphinxbase' extension
    swigging deps/sphinxbase/swig/sphinxbase.i to deps/sphinxbase/swig/sphinxbase_wrap.c
    swig.exe -python -modern -threads -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/win32 -Ideps/sphinxbase/swig -outdir sphinxbase -o deps/sphinxbase/swig/sphinxbase_wrap.c deps/sphinxbase/swig/sphinxbase.i
    error: command 'swig.exe' failed: No such file or directory
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\yeetgod\AppData\Local\Programs\Python\Python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\yeetgod\\AppData\\Local\\Temp\\pip-install-aims1y79\\pocketsphinx\\setup.py'"'"'; __file__='"'"'C:\\Users\\yeetgod\\AppData\\Local\\Temp\\pip-install-aims1y79\\pocketsphinx\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\yeetgod\AppData\Local\Temp\pip-record-fcvz7sp8\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.

我希望二进制文件可以工作,但是给了我这个错误消息

错误:该平台上不支持Pocketsphinx-0.1.15-cp36-cp36m-win32.whl。

然后我尝试了另一个二进制文件(win64 amd一个,它给了我这个错误:

错误:该平台上不支持Pocketsphinx-0.1.15-cp36-cp36m-win_amd64.whl。

python module pip cmusphinx pocketsphinx
1个回答
1
投票

错误:该平台上不支持Pocketsphinx-0.1.15-cp36-cp36m-win32.whl

[您正在尝试安装适用于Python 3.6到Python 3.8的轮子。那是行不通的。

The latest release of pocketsphinx于一年多前于2018年6月4日发布。当时还不存在Python 3.8,因此他们没有为此提供轮子。

实际上,他们甚至没有安装Python 3.7的轮子。您必须使用Python 3.6或从源代码编译项目。要从源代码进行编译,您需要a number of prerequisites

错误

错误:命令'swig.exe'失败:没有这样的文件或目录

意味着您错过了先决条件之一-SWIG。

© www.soinside.com 2019 - 2024. All rights reserved.