[Solved] Python install kenlm error: ERROR: Command errored out with exit status 1: …

Use pip install kenlm error:

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: …

It seems to be the GCC Issue

Solution:
Use pypi-kenlm

pip install pypi-kenlm

Read More: