Can't import open3d (from time to time)

Here are all the imports:

from omni.isaac.kit import SimulationApp
import carb

simulation_app = SimulationApp({"headless": False})

import omni
import omni.graph.core as og
import omni.kit.viewport.utility
import omni.replicator.core as rep
from omni.isaac.core import SimulationContext
from omni.isaac.core.utils import prims, stage
from omni.isaac.core.utils.extensions import enable_extension
from omni.isaac.core.utils.render_product import create_hydra_texture
from omni.isaac.core.utils.rotations import euler_angles_to_quat
from omni.isaac.core.utils.viewports import set_camera_view
from pxr import Gf
import open3d as o3d

Sometimes, import open3d as o3d succeeds, but visualizing a point cloud with open3d fails to open a window, resulting in:

"[Open3D WARNING] Failed to initialize GLEW."

In other times, import open3d as o3d fails right away:

Exception has occurred: ImportError
cannot import name 'NotRequired' from 'typing_extensions' (/home/user/.local/share/ov/pkg/isaac_sim-2023.1.0-hotfix.1/extscache/omni.pip.torch-2_0_1-2.0.2+105.1.lx64/torch-2-0-1/
  File "/orbit/custom_sim/", line 36, in <module>
    import open3d as o3d
ImportError: cannot import name 'NotRequired' from 'typing_extensions' (/home/user/.local/share/ov/pkg/isaac_sim-2023.1.0-hotfix.1/extscache/omni.pip.torch-2_0_1-2.0.2+105.1.lx64/torch-2-0-1/

The latter problem doesn’t make sense to me, since import open3d as o3d works when I activate in the terminal the same conda environment I use for the simulation.
Environment: python 3.10, typing_extensions==4.7.1.

Wondering if that’s a known problem?

1 Like

I am facing the same issue as well. Is there any fix for this issue?

A temporary workaround could be to save the data for visuals to disk and visualize it in an external script