Notebook 在 Binder 中无法使用; OSError: libusb-1.0.so.0: 无法打开共享对象文件:没有那个文件或目录

时间:2021-02-05 18:12:17

标签: python jupyter-notebook jupyter android-binder open3d

每当我尝试在活页夹上运行以下笔记本代码时,我都会收到此错误:

OSError Traceback(最近一次调用最后一次) 在 1 从 pyntcloud 导入 PyntCloud ----> 2 将 open3d 导入为 od 3 4 5 路径 ="objects\Brigdging.stl"

/srv/conda/envs/notebook/lib/python3.7/site-packages/open3d/init.py 中 54 # 在加载 CUDA pybind dll 之前执行此操作以正确解析符号 55 try: # StopIteration if cpu version not available ---> 56 _CDLL(next((_Path(file).parent / 'cpu').glob('pybind*'))) 57 除了 StopIteration: 58关

/srv/conda/envs/notebook/lib/python3.7/ctypes/init.py in init(self, name, mode, handle, use_errno, use_last_error) 362 363 如果句柄为无: --> 364 self._handle = _dlopen(self._name, mode) 365 其他: 第366话

OSError: libusb-1.0.so.0: 无法打开共享对象文件:没有那个文件或目录

应该安装 libusb,我在 requirements.txt 中检查了它 - 但它仍然无法工作,只有当我在本地主机上运行笔记本时。

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"

1 个答案:

答案 0 :(得分:0)

在名为 requirements.txt 的目录中制作一个更简单的 binder,其中仅包含您需要的特殊软件包和未固定版本。

然后在apt.txt目录下添加binder文件,内容如下:

libusb-1.0.0
libgl1-mesa-glx

处理仅基于 here 添加 libGL 时出现的 libusb-1.0.0 问题。

参见关于 Jupyter Discourse site here 的讨论。