0

whenever i try to run the following notebook code on binder, i get this error:

OSError Traceback (most recent call last) in 1 from pyntcloud import PyntCloud ----> 2 import open3d as od 3 4 5 path ="objects\Brigdging.stl"

/srv/conda/envs/notebook/lib/python3.7/site-packages/open3d/init.py in 54 # Do this before loading the CUDA pybind dll to correctly resolve symbols 55 try: # StopIteration if cpu version not available ---> 56 _CDLL(next((_Path(file).parent / 'cpu').glob('pybind*'))) 57 except StopIteration: 58 pass

/srv/conda/envs/notebook/lib/python3.7/ctypes/init.py in init(self, name, mode, handle, use_errno, use_last_error) 362 363 if handle is None: --> 364 self._handle = _dlopen(self._name, mode) 365 else: 366 self._handle = handle

OSError: libusb-1.0.so.0: cannot open shared object file: No such file or directory

libusb should be installed, i checked it in the requirements.txt - but its still not working, only if i run just the notebook on localhost.

from pyntcloud import PyntCloud
import open3d as od


path ="objects\Brigdging.stl"
n_size=32



if path.endswith(".stl") :
    test1_or = od.io.read_triangle_mesh(path)
    test1 = PyntCloud.from_instance("open3d", test1_or)
else:
    test1 = PyntCloud.from_file(path)
    
print(test1)
cloud = test1.get_sample(
            "mesh_random",
            n=100000,
            rgb=False,
            normals=False,
            as_PyntCloud=True)

cloud.plot()

voxelgrid_id = cloud.add_structure("voxelgrid", n_x=n_size, n_y=n_size, n_z=n_size)

voxelgrid = cloud.structures[voxelgrid_id]

voxelgrid.plot(d=3, mode="density", cmap="hsv"
Test12
  • 17
  • 4

1 Answers1

0

Make a simpler requirements.txt in a directory named binder with just the special packages you need and the versions unpinned.

Then add apt.txt file in the binder directory with the following contents:

libusb-1.0.0
libgl1-mesa-glx

Dealing with libGL issue that arises if you only add libusb-1.0.0 based on here.

See discussion working this out on Jupyter Discourse site here.

Wayne
  • 6,607
  • 8
  • 36
  • 93