weixin_51021682
weixin_51021682
2021-03-17 12:38
采纳率: 75%
浏览 142

python3.9安装pocketsphinx-0.1.15.tar.gz失败

提示报错为error: command 'I:\\git\\VC\\VC\\Tools\\MSVC\\14.28.29910\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2

 

以下为完整报错信息

Failed to build pocketsphinx
Installing collected packages: pocketsphinx
    Running setup.py install for pocketsphinx ... error
    ERROR: Command errored out with exit status 1:
     command: 'i:\python\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Administrator\\AppData\\Local\\Tem
p\\pip-req-build-ncjgpcid\\setup.py'"'"'; __file__='"'"'C:\\Users\\Administrator\\AppData\\Local\\Temp\\pip-req-build-ncjgpcid\\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\Administrator\AppData\Local\Temp\pip-record-qo5aetrs\install-record.txt' --single-version-extern
ally-managed --compile --install-headers 'i:\python\Include\pocketsphinx'
         cwd: C:\Users\Administrator\AppData\Local\Temp\pip-req-build-ncjgpcid\
    Complete output (22 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/sp
hinxbase/swig -outdir sphinxbase -o deps/sphinxbase/swig/sphinxbase_wrap.c deps/sphinxbase/swig/sphinxbase.i
    Deprecated command line option: -modern. This option is now always on.
    creating build
    creating build\temp.win-amd64-3.9
    creating build\temp.win-amd64-3.9\Release
    creating build\temp.win-amd64-3.9\Release\deps
    creating build\temp.win-amd64-3.9\Release\deps\sphinxbase
    creating build\temp.win-amd64-3.9\Release\deps\sphinxbase\src
    creating build\temp.win-amd64-3.9\Release\deps\sphinxbase\src\libsphinxbase
    creating build\temp.win-amd64-3.9\Release\deps\sphinxbase\src\libsphinxbase\fe
    creating build\temp.win-amd64-3.9\Release\deps\sphinxbase\src\libsphinxbase\feat
    creating build\temp.win-amd64-3.9\Release\deps\sphinxbase\src\libsphinxbase\lm
    creating build\temp.win-amd64-3.9\Release\deps\sphinxbase\src\libsphinxbase\util
    creating build\temp.win-amd64-3.9\Release\deps\sphinxbase\swig
    I:\git\VC\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS
 -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/win32 -Ii:\python\inclu
de -Ii:\python\include -II:\git\VC\VC\Tools\MSVC\14.28.29910\ATLMFC\include -II:\git\VC\VC\Tools\MSVC\14.28.29910\include /Tcdeps/sphinxbase/s
rc/libsphinxbase/fe\fe_interface.c /Fobuild\temp.win-amd64-3.9\Release\deps/sphinxbase/src/libsphinxbase/fe\fe_interface.obj /wd4244 /wd4267 /
wd4197 /wd4090 /wd4018 /wd4311 /wd4312 /wd4334 /wd4477 /wd4996
    fe_interface.c
    deps/sphinxbase/src/libsphinxbase/fe\fe_interface.c(37): fatal error C1083: 无法打开包括文件: “stdio.h”: No such file or directory
    error: command 'I:\\git\\VC\\VC\\Tools\\MSVC\\14.28.29910\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'i:\python\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\A
dministrator\\AppData\\Local\\Temp\\pip-req-build-ncjgpcid\\setup.py'"'"'; __file__='"'"'C:\\Users\\Administrator\\AppData\\Local\\Temp\\pip-r
eq-build-ncjgpcid\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.clo
se();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Administrator\AppData\Local\Temp\pip-record-qo5aetrs\install-re
cord.txt' --single-version-externally-managed --compile --install-headers 'i:\python\Include\pocketsphinx' Check the logs for full command out
put.

我已经安装了vc,而且也有cl.exe文件,可是却提示找不到,环境变量path两个都添加了I:\git\VC\VC\Tools\MSVC\14.28.29910\bin;I:\git\VC\VC\Tools\MSVC\14.28.29910\bin\

网上找了很多教程,还是报错,哪位大佬能教我一下

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

2条回答 默认 最新

  • bill20100829
    歇歇 2021-03-17 13:26
    已采纳

    christophgohlke善意地在他的非官方扩展库中添加了一个pocketsphinx的编译版本。在

    如果您运行的是python3.9(32位),请下载:“pocketsphinx-0.1.15-cp39-cp39m-win32.whl”

    这里:https://download.csdn.net/download/bill20100829/15868815

    https://download.csdn.net/download/bill20100829/15868825

     

    然后运行: pip3 install “pocketsphinx-0.1.15-cp39-cp39m-win32.whl”

    点赞 1 评论
  • QA_Assistant
    有问必答小助手 2021-03-17 17:09

    你好,我是问答小助手,本次您提出的有问必答问题,已经由其他小伙伴为您做出解答,并解决了您的问题。

    本次提问扣除的有问必答次数,已经为您补发到账户,我们后续会持续优化,扩大我们的服务范围,为您带来更好地服务。

    点赞 评论

相关推荐