marcoesposito1988 / cython_catkin_example

Example of integration between Cython and ROS/catkin
18 stars 8 forks source link

dynamic module does not define module export function (PyInit_...) #4

Open a-z-e-r-i-l-a opened 4 years ago

a-z-e-r-i-l-a commented 4 years ago

Hi,

I wanted to ask if you know a way to have the generated python wrapper python3 compatible. I had a try similar to ros_cython_example but the generated python wrapper was only usable by python2. For python3 it gives the error:

dynamic module does not define module export function (PyInit_..)

I tried some of the suggestions over internet about this, but it seems ros or cmake adds some more complexity to the issue, but there should be a solution for it.

Thank you.

marcoesposito1988 commented 4 years ago

There may be one, but it will lead to trouble, since the official ROS distribution targets python2.

Unless you absolutely need python 3, I would suggest that you stick to the officially supported version, while keeping your code compatible with both so that you will be able to migrate with ease.