Notebook not working on binder - open3d seems to break it

i am trying to load .stl files into voxelgrids on binder so other people can view it - i am using open3d to achieve this, but for some reason (even though it works on localhost) the notebook gets an error in the import open3d line.

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

both libusb and open3d are in a requirements.txt, i cannot find anything about this error. also, .off files without open3d load with no problems.

if you want to look at my code/the exact error, i have it on stackoverflow here.

Github repository: GitHub - theschlork/jupyter

if anyone could help me out, that would be greatly appreciated.

If you’re able to share your GitHub repository (or whatever repository you’re passing to mybinder) that would be helpful.

hadnt thought of that for some reason - there you go: GitHub - theschlork/jupyter

I’d start with making a binder directory and just put a new requirements.txt in there with only the packages you need and nothing pinned. Nothing that Binder already has. No notebook, jedi, nbconvert, nbformat, jupyter*, etc… Just the unusual packages you might need. Use the example binder if you are in doubt if it already has a module.

I switched to installing it with conda and got a different issue with libGL and so I think we can fix it with an apt.txt config file.

changed the requirements.txt like that - didnt fix it.

thats the exact error i am getting, looks like open3d is the problem - but the normal pyntcloud conversion works, its just open3d that doesnt.
does open3d need a gpu? i havent seen that anywhere - but that might explain why it runs on localhost…

1 Like

how does this work with an apt file? dont know anything about that…

I forked it and I’m trying stuff based on mybinder ImportError: libGL.so.1: cannot open shared object file: No such file or directory · Issue #10 · Fireline-Science/tello_sim · GitHub
I’m getting libGL being an issue now.

Running import open3D now works in my fork without error.

My fork just takes the simple version and adds in the binder directory a configuration file named apt.txt 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.

Use of apt.txt binder configuration file is described here.

1 Like

now it works! thanks a lot for the whole effort, never couldve come to that - kind of new to this whole jupyter stuff.

thanks so much!

1 Like

Don’t worry. There’s a lot of tech in play in making Binder work and so making a repo binder-ready isn’t always straightforward. While most cases it is, you definitely stumbled upon one of those rare cases and that is why the ‘help-wanted’ topic for Binder exists.

1 Like