jskinn / ORB_SLAM2-PythonBindings

A python wrapper for ORB_SLAM2
BSD 2-Clause "Simplified" License
162 stars 40 forks source link

After installation can not import orbslam2 #17

Closed s271 closed 4 years ago

s271 commented 4 years ago
--------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-3e49d7933f8b> in <module>
----> 1 import orbslam2

ModuleNotFoundError: No module named 'orbslam2'

It seems installation was successful , ORB-SLAM2 working too, but import in python doesn't work. I have python 3.7.3 installed by Anaconda, make install was done with sudo (sudo make install) If I manually copy orbslam2.so into /home/user/anaconda3/lib/python3.7 it failing to find other libraries:

ImportError: libDBoW2.so: cannot open shared object file: No such file or directory

Ok, I found workaround for anaconda:

  1. manually copy orbslam2.so to /home/user/anaconda3/lib/python3.7
  2. manually copy libDBoW2.so and libg2o.so to /home/user/anaconda3/lib/ orbslam2 is imported now
s271 commented 4 years ago

Workaround for anaconda found

gouri1210 commented 1 year ago

can anyone give me idea how i can import ORBSLAM2 module into my python script?