You might be missing call to PyImport_AppendInittab(params) before initialization. Read more about it here https://cython.readthedocs.io/en/latest/src/userguide/source_files_and_compilation.html