使用pip install kenlm 报错:
python/kenlm.cpp:6381:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
tstate->exc_traceback = *tb;
^~~~~~~~~~~~~
curexc_traceback
error: command ‘gcc’ failed with exit status 1
ERROR: Command errored out with exit status 1: …
目测是GCC的问题
解决方案1.
使用pypi-kenlm
pip install pypi-kenlm
解决方案2.
参考
https://github.com/shibing624/pycorrector/wiki/Install-kenlm

本文介绍了使用pip安装kenlm时遇到的错误及其原因分析,提供了两种解决方案:一是使用pypi-kenlm替代;二是给出具体的技术链接供进一步研究。
6828

被折叠的 条评论
为什么被折叠?



