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

[BUG] Import teaserpp_python before scipy may cause ImportError #160

Open
jingnanshi opened this issue Dec 20, 2022 · 1 comment
Open

[BUG] Import teaserpp_python before scipy may cause ImportError #160

jingnanshi opened this issue Dec 20, 2022 · 1 comment

Comments

@jingnanshi
Copy link
Member

Describe the bug
Import teaserpp_python before scipy may cause scipy to use the system path to libstdc++.so instead of the one in anaconda.
Error message looks like this:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/jnshi/miniconda3/envs/casper-3d/lib/python3.9/site-packages/scipy/stats/__init__.py", line 467, in <module>
    from ._stats_py import *
  File "/home/jnshi/miniconda3/envs/casper-3d/lib/python3.9/site-packages/scipy/stats/_stats_py.py", line 46, in <module>
    from . import distributions
  File "/home/jnshi/miniconda3/envs/casper-3d/lib/python3.9/site-packages/scipy/stats/distributions.py", line 8, in <module>
    from ._distn_infrastructure import (rv_discrete, rv_continuous, rv_frozen)
  File "/home/jnshi/miniconda3/envs/casper-3d/lib/python3.9/site-packages/scipy/stats/_distn_infrastructure.py", line 24, in <module>
    from scipy import optimize
  File "/home/jnshi/miniconda3/envs/casper-3d/lib/python3.9/site-packages/scipy/__init__.py", line 211, in __getattr__
    return _importlib.import_module(f'scipy.{name}')
  File "/home/jnshi/miniconda3/envs/casper-3d/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/home/jnshi/miniconda3/envs/casper-3d/lib/python3.9/site-packages/scipy/optimize/__init__.py", line 413, in <module>
    from ._linprog import linprog, linprog_verbose_callback
  File "/home/jnshi/miniconda3/envs/casper-3d/lib/python3.9/site-packages/scipy/optimize/_linprog.py", line 21, in <module>
    from ._linprog_highs import _linprog_highs
  File "/home/jnshi/miniconda3/envs/casper-3d/lib/python3.9/site-packages/scipy/optimize/_linprog_highs.py", line 20, in <module>
    from ._highs._highs_wrapper import _highs_wrapper
ImportError: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /home/jnshi/miniconda3/envs/casper-3d/lib/python3.9/site-packages/scipy/optimize/_highs/_highs_wrapper.cpython-39-x86_64-linux-gnu.so)

Steps to Reproduce
Seems to happen in a Python 3.9 environment when you install scipy before teaserpp_python

@MedericFourmy
Copy link

I had the same error when running the teaser_python_ply.py example. Somehow, changing import orders with open3d solved the issue:

import open3d as o3d
import teaserpp_python

-> bug

import teaserpp_python
import open3d as o3d

-> OK

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

No branches or pull requests

2 participants