啦啦啦大师傅 2021-03-17 12:38 采纳率: 60%
浏览 437
已采纳

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条回答 默认 最新

  • 歇歇 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条)

报告相同问题?

悬赏问题

  • ¥50 C# 使用DEVMOD设置打印机首选项
  • ¥15 想用@vueuse 把项目动态改成深色主题,localStorge里面的vueuse-color-scheme一开始就给我改成了dark,不知道什么原因(相关搜索:背景颜色)
  • ¥20 OPENVPN连接问题
  • ¥15 flask实现搜索框访问数据库
  • ¥15 mrk3399刷完安卓11后投屏调试只能显示一个设备
  • ¥100 如何用js写一个游戏云存档
  • ¥15 ansys fluent计算闪退
  • ¥15 有关wireshark抓包的问题
  • ¥15 需要写计算过程,不要写代码,求解答,数据都在图上
  • ¥15 向数据表用newid方式插入GUID问题