I am on Ubuntu 18.04, Cython 3.0.0, Python 3.8. I tried to compile libfreenect with cmake .. -L -DBUILD_PYTHON3=ON -DPython3_EXACTVERSION=3.8 make It gave the error: Cannot assign type 'void (freenect_device *, void *, uint32_t) except * nogil' I downgraded Cython to 0.29.14 and it compiled perfectly.