motion-planning / rrt-algorithms

n-dimensional RRT, RRT* (RRT-Star)
MIT License
600 stars 173 forks source link

OSError: libspatialindex_c.so.5: cannot open shared object file #24

Closed muety closed 5 years ago

muety commented 5 years ago

I'm getting the following error. Any ideas?

Traceback (most recent call last):
  File "examples/rrt/rrt_2d.py", line 5, in <module>
    from src.rrt.rrt import RRT
  File "/home/ferdinand/dev/rrt-algorithms/src/rrt/rrt.py", line 1, in <module>
    from src.rrt.rrt_base import RRTBase
  File "/home/ferdinand/dev/rrt-algorithms/src/rrt/rrt_base.py", line 5, in <module>
    from src.rrt.tree import Tree
  File "/home/ferdinand/dev/rrt-algorithms/src/rrt/tree.py", line 1, in <module>
    from rtree import index
  File "/home/ferdinand/.local/lib/python3.6/site-packages/rtree/__init__.py", line 1, in <module>
    from .index import Rtree
  File "/home/ferdinand/.local/lib/python3.6/site-packages/rtree/index.py", line 5, in <module>
    from . import core
  File "/home/ferdinand/.local/lib/python3.6/site-packages/rtree/core.py", line 127, in <module>
    rt = ctypes.CDLL(lib_name)
  File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libspatialindex_c.so.5: cannot open shared object file: No such file or directory
SZanlongo commented 5 years ago

That seems like an issue with the python environment. Try printing os.environ right before the exception to see if it has the correct environment. It could be that the rtree library isn't being correctly detected. You could try rebooting or doing sudo ldconfig on linux.

muety commented 5 years ago

This helped.