kpu / kenlm

KenLM: Faster and Smaller Language Model Queries
http://kheafield.com/code/kenlm/
Other
2.46k stars 514 forks source link

Error while installing on python 3.11 #411

Open danijel3 opened 1 year ago

danijel3 commented 1 year ago

Tested using Docker. This version of Dockerfile works:

FROM python:3.10

RUN pip install -U pip && pip install kenlm

And this fails:

FROM python:3.11

RUN pip install -U pip && pip install kenlm

There are several warnings, but the errors are basically this:

      python/kenlm.cpp:452:62: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}
      python/kenlm.cpp:10248:14: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}
      python/kenlm.cpp:10285:19: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}
      python/kenlm.cpp:10285:19: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}

The errors are the same for both the pypi and the github versions.