PCLKeypoints icon indicating copy to clipboard operation
PCLKeypoints copied to clipboard

ImportError

Open JuanDuGit opened this issue 4 years ago • 5 comments

Hi, thanks for sharing the code. I have compiled and installed this module successfully, but encountered the following ImportError when trying import it in python script.

>>> import PCLKeypoint Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: dynamic module does not define module export function (PyInit_PCLKeypoint) I am using Ubuntu 18.04.3 LTS and the python version is 3.6.9.

Do you possiblly have any ideas how to fix this problem?

JuanDuGit avatar Feb 25 '20 12:02 JuanDuGit

I have no clue why this happens. Maybe you can post your compilation results here? One more thing, importing the module at its directory may cause error. For example, running python; import pclkeypoint in the directory of pclkeypoint or the parent directory of pclkeypoint may cause errors.

lijx10 avatar Feb 27 '20 05:02 lijx10

I have also run into this problem. Did you fix this issue? if yes could you please help me?

ngthanhtin avatar Mar 13 '20 04:03 ngthanhtin

@ngthanhtin I suspect the issue happens at the link time. I temporily fixed this by using py2 isntead of py3. Probably not the most right thing to do, but worked for me

JuanDuGit avatar Mar 16 '20 13:03 JuanDuGit

It seems that the installed PCL has been linked to the python2, which may include /usr/include/python2.7 (you can find this in PCLKeypoint_LIB_DEPENDS from CMakeCache.txt ). So I recompile the PCL 1.11.0, and the problem has gone.

ybbbbt avatar May 19 '20 12:05 ybbbbt

It seems that the installed PCL has been linked to the python2, which may include /usr/include/python2.7 (you can find this in PCLKeypoint_LIB_DEPENDS from CMakeCache.txt ). So I recompile the PCL 1.11.0, and the problem has gone.

this worked for me I installed pcl with sudo apt install libpcl-dev instead I compile PCL 1.11.0 on ubuntu 18.04 and problem solve

patrick100 avatar Jul 19 '20 00:07 patrick100