I have just compiled part of my C library as an extension using Cython, as a \"proof of concept\". I managed to hack the code (const correctnes problems etc aside), to final
Another really late answer in my case I had accidentally called cython in a terminal that was running python2, while trying to use the generated library from a terminal that was on another python environment, using python3.
Using the same python version everywhere fixed it.