minisam icon indicating copy to clipboard operation
minisam copied to clipboard

Python wrapper fails upon import

Open generalizedeigenvector opened this issue 4 years ago • 6 comments

I compiled and installed the C++ and then Python according to instructions and when I finally do import minisam I get this error:


ImportError Traceback (most recent call last) in ----> 1 import minisam

~/anaconda3/lib/python3.7/site-packages/minisam/init.py in 1 2 # wrapped c++ module ----> 3 from . _minisam_py_wrapper import * 4 5

ImportError: /home/maintenance/anaconda3/lib/python3.7/site-packages/minisam/_minisam_py_wrapper.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _Z13wrap_geometryRN8pybind116moduleE

What am I missing?

generalizedeigenvector avatar May 05 '20 18:05 generalizedeigenvector

Did you manage to solve this? I am also getting this error

Limzui avatar Nov 02 '20 12:11 Limzui

Same error here, does anyone has a solution?

streamB avatar Nov 21 '20 14:11 streamB

After you have done all the cmake and make commands. Can you go into the build folder and try to execute with your virtual environment (activated) : python3 setup.py

Then, start python3 and and try to import minisam do you still get the error?

stoutheo avatar Jan 19 '21 22:01 stoutheo

I'm having same problem, too. With Python 3.9 in Windows, it works.But with Python 3.6 in Ubuntu, it shows error same with above.

wanderingcar avatar Feb 18 '21 07:02 wanderingcar

I saw the same thing and was finally able to import minisam in Python without seeing the undefined symbol error by installing an older version of Sophus (commit a0fe89a323e20c42d3cecb590937eb7a06b8343a) and then re-installing minisam. This is Ubuntu 18.04 on an ARM64 (Jetson Xavier NX) by the way.

motiv-ncb avatar May 24 '21 09:05 motiv-ncb

you have to compile with Sophus dependency. without it doesn't work.

Lishen1 avatar Nov 23 '21 09:11 Lishen1