Since cffi 1.4 the preferred way is to use `@ffi.def_extern()` instead of `@ffi.callback(..)` See https://cffi.readthedocs.io/en/latest/using.html#extern-python Solving this issue will raise the requirement to cffi 1.4 or above.