-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImportError #10
Comments
Hi @ChenHoy, Can you help me work the issue out ? I meet the issue after building orbslam2. Thanks |
Failure to import like that indicates that python cannot find one of the referenced .so files when importing, even if your compiler could find them when it linked it. Probably one of the boost .so files. |
@jskinn Hi, I have compiled successfully in virtual environment, and used a symlink to add the built orbslam2.so to the virtualenv and checked dependencies are well. However, I am not luck to import it successfully. Can you help me solve the issue ? |
A couple of issues:
|
This issue can also be caused if you're trying to build the project with OpenCV4 instead of OpenCV2 or 3. Unfortunately the ORB_SLAM2 repository isn't compatible with OpenCV4 either. You can use this fork of the original repo to build under OpenCV4, however. As far as this project is concerned, only a couple changes are needed to work with the aforementioned fork:
|
Hello,
I am trying to use the bindinsg with Python3.7 and boost 1.71.
Both is found during the building process and no warnings or errors are raised. However, when I import orbslam2, I get the following ImportError:
"ImportError: path/to/venv/lib/python3.7/site-packages/orbslam2.so: undefined symbol: _ZN5pbcvt26matToNDArrayBoostConverter7convertERKN2cv3MatE"
The paths to boost has been adjusted in CMakeLists.txt (Boost 1.71 REQUIRED COMPONENTS python37). Everything else was just adjusted to Python 3.7.
Hopefully, someone has an idea why this occurs. This error is similar to Issue #1, but I have explicitly set the paths correctly and the dependencies are apparently found correctly when building.
Thanks in advance for any help!
The text was updated successfully, but these errors were encountered: