1

I am using Numpy version 2.x. I get this error:

from catboost import CatBoostClassifier

 File "_catboost.pyx", line 1, in init _catboost
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

I downloaded version 1.16+ of numpy and minus catboost but no change.

1 Answer 1

2

It appears that catboost is not compatible with NumPy 2.0 at the time of this question (see e.g. https://github.com/catboost/catboost/issues/2671).

To fix the issue, you should install NumPy 1.26 or older. You report trying NumPy 1.16; this version may be too old for some of the other catboost requrirements, which could lead to a similar error. I'd suggest trying a more recent NumPy 1.X version, such as 1.26.

Not the answer you're looking for? Browse other questions tagged or ask your own question.