I have a simple pyx file:
$ cat helloworld.pyx
print("hello world in pyx file to be converted to so file by cython.")
I have created an .so module using Cython. The directory contains following files:
$ ls -ltrh
total 140K
-rw-r--r-- 1 cardio cardio 177 Jul 3 2018 setup.py
-rw-r--r-- 1 cardio cardio 73 Jul 3 2018 helloworld.pyx
-rw-r--r-- 1 cardio cardio 74K Jul 3 2018 helloworld.c
-rwxr-xr-x 1 cardio cardio 52K Jul 3 2018 helloworld.cpython-35m-x86_64-linux-gnu.so
drwxr-xr-x 2 cardio cardio 4.0K Sep 10 20:21 __pycache__
However, when I try to import this module, I get error:
$ python3 -c "import helloworld"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'helloworld'
Where is the problem and how can it be solved?
Edit: The .so file was created in 2018! On recreating it again, everything is working perfectly! Probably there was some version conflict between Cython and Python.