$ cythonize -a -i hello.pyx
running build_ext
building 'hello' extension
...
Now I have a hello.so file, as well as the other ones (hello.pyx, hello.c)
When I then try to import the function:
$ python
Python 3.5.3 |Continuum Analytics, Inc.| (default, Mar 6 2017, 11:58:13)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import hello
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: dynamic module does not define module export function (PyInit_hello)
>>>
I know this has been asked before (link below), but it seems the solution was to run python3, which I am doing already, so I don't know how to fix my problem Cython Compilation Error: dynamic module does not define module export function
I should add the cythonize version I am using: $ cython --version Cython version 0.24