I searched around, and the cause of this error might be that Google colab runs the notebook code in servers that do not have explicit support for interactive GUIs. However, I have been able to run and visualize stuff in a 3D GUI, similar to compas_view2.App, in a colab notebook: Google Colab
Hey Rafael, sorry for the late reply. Yep… unfortunately it is not very realistic to run view2 with colab since it cannot access your local graphic card with just openGL,a rather fundamental problem. As Tom mentioned, we did compas_notebook specifically for this purpose. Here’s some examples; https://github.com/BRG-research/compas_notebook/tree/main/scripts in background it basically converts compas data structure to gltf and visualize it with three.js (webGL), it’s not as versatile but does cover basic elements like line edges faces. How complicated will it be in your visualisation?
@Li_Chen – thanks for sharing! I ran one of the scripts on a collab notebook and it works, so this is indeed promising. I essentially want to display a bunch of cylinders and arrows (represented as meshes, i.e. compas_view2.shapes.Arrow), each with a different color.
Do you think this is feasible with the current version of compas_notebook? I will anyways take a closer look and keep you all posted.