rtabmap
rtabmap copied to clipboard
torch import error with superglue
Hi,
I am having a python torch version problem I guess.
this is the error I get when trying to use superglue
Details
[ERROR] (2023-08-13 15:10:40.026) PyMatcher.cpp:61::PyMatcher() Module "rtabmap_superglue" could not be imported! (File="/home/fede/rtabmap/archive/2022-IlluminationInvariant/scripts/SuperGluePretrainedNetwork/rtabmap_superglue.py") [ERROR] (2023-08-13 15:10:40.026) PyMatcher.cpp:62::PyMatcher() Traceback (most recent call last):
File "/home/fede/rtabmap/archive/2022-IlluminationInvariant/scripts/SuperGluePretrainedNetwork/rtabmap_superglue.py", line 10, in
File "/usr/local/lib/python3.8/dist-packages/torch/init.py", line 229, in
ImportError: /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_python.so: undefined symbol: _ZNK5torch3jit5Graph8toStringEb
but if I run the scrpit directly from the shell it works:
Details
~/rtabmap/archive/2022-IlluminationInvariant/scripts$ python SuperGluePretrainedNetwork/rtabmap_superglue.py SuperGlue python init() Loaded SuperGlue model ("indoor" weights)
I am on ubuntu 20.04 python 3.8 I have installed pytorch via pip and I have compiled rtabmap with libtorch 2.0.1
Thanks
See also https://github.com/introlab/rtabmap/issues/599#issuecomment-1676467175