Skip to content
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: /usr/lib/libboost_python.so.1.66.0: undefined symbol: PyString_InternFromString #344

Open
Smallha61109 opened this issue Jul 18, 2018 · 1 comment

Comments

@Smallha61109
Copy link

Hello,
I am using python3 as default. I am able to build setup.py successfully without any error, but while I try to execute ./bin/opensfm_run_all data/berlin I got this error:

Traceback (most recent call last):
File "/home/gary/project/OpenSfM/bin/opensfm", line 10, in
from opensfm import commands
File "/home/gary/project/OpenSfM/opensfm/commands/init.py", line 2, in
from . import extract_metadata
File "/home/gary/project/OpenSfM/opensfm/commands/extract_metadata.py", line 5, in
from opensfm import dataset
File "/home/gary/project/OpenSfM/opensfm/dataset.py", line 14, in
from opensfm import io
File "/home/gary/project/OpenSfM/opensfm/io.py", line 18, in
from opensfm import features
File "/home/gary/project/OpenSfM/opensfm/features.py", line 9, in
from opensfm import csfm
ImportError: /usr/lib/libboost_python.so.1.66.0: undefined symbol: PyString_InternFromString

Seems like it is using python2's boost instead of python3's. Is there any suggestion on how to fix this?

@paulinus
Copy link
Member

paulinus commented Aug 7, 2018

In executable scripts, we are using the shebang #!/usr/bin/env python. This is calling python2 in most systems.

As of now, the simplest solution to run using python3 is to call the opensfm using as

python3 opensfm command path/to/dataset

You can edit the opensfm_run_all script to do so as

#!/usr/bin/env bash

set -e

DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )

python3 $DIR/opensfm extract_metadata $1
python3 $DIR/opensfm detect_features $1
python3 $DIR/opensfm match_features $1
python3 $DIR/opensfm create_tracks $1
python3 $DIR/opensfm reconstruct $1
python3 $DIR/opensfm mesh $1
python3 $DIR/opensfm undistort $1
python3 $DIR/opensfm compute_depthmaps $1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants