OpenSfM icon indicating copy to clipboard operation
OpenSfM copied to clipboard

Virtual envs: ImportError with `bin/opensfm_run_all`

Open ayoubft opened this issue 1 year ago • 3 comments

Building OpenSfM

What I have

Operating System: Manjaro Linux KDE Plasma Version: 5.26.5 KDE Frameworks Version: 5.103.0 Qt Version: 5.15.8 Kernel Version: 5.15.94-1-MANJARO (64-bit) Graphics Platform: X11 Processors: 8 × Intel® Core™ i7-8650U CPU @ 1.90GHz Memory: 31.1 GiB of RAM Graphics Processor: Mesa Intel® UHD Graphics 620 Manufacturer: LENOVO System Version: ThinkPad T580

What I did

  • [x] cloned recursively the repo
  • [x] installed opencv and ceres-solver (with paru package manager)
  • [x] created virtual env using conda called opensfm-env and activated it
  • [x] runned pip install -r requirements
  • [x] runned python setup.py build all went well

What I got

But when I want to test bin/opensfm_run_all data/berlin I get this error:

Traceback (most recent call last):
  File "/source/OpenSfM/bin/opensfm_main.py", line 9, in <module>
    from opensfm import commands
  File "/source/OpenSfM/opensfm/__init__.py", line 1, in <module>
    from opensfm import pybundle
ImportError: /home/ayoubf/miniconda3/envs/opensfm-env/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /usr/lib/libtbb.so.12)

What could possibly have gone wrong ?

Thank you.

ayoubft avatar Mar 08 '23 17:03 ayoubft

Hello, I am getting the same error. ANy workaround you found? Thanks.

gautam-sh avatar Apr 27 '23 15:04 gautam-sh

Hi @gautam-sh @ayoubft ,

Have you tried one of the first two results on google? [1] https://github.com/rstudio/reticulate/issues/1282 [2] https://stackoverflow.com/questions/72540359/glibcxx-3-4-30-not-found-for-librosa-in-conda-virtual-environment-after-tryin

fabianschenk avatar Apr 27 '23 15:04 fabianschenk

Thanks @fabianschenk and I apologize for not returning back here and mentioning that I already tried this solution and got it working.

So the installation process should look like this:

  • [x] clone recursively the repo
  • [x] install opencv and ceres-solver (with paru package manager or other)
  • [x] create virtual env using conda with name opensfm-env and activate it
  • [x] run pip install -r requirements
  • [x] run conda install -c conda-forge gcc=12.1.0
  • [x] run python setup.py build

ayoubft avatar Apr 29 '23 14:04 ayoubft