Hi everyone,
I’ve been running into an issue lately with Isaac Sim. Whether I launch it via the Omniverse Launcher or by using ./isaaclab.sh -s
(inside or outside my virtual environment isaaclab
), I keep getting a bunch of red error messages in the terminal. One of these errors is:
[2,861ms] [Error] [omni.ext._impl.custom_importer] Failed to import python module omni.isaac.universal_robots. Error: No module named 'torch'. Traceback:
Traceback (most recent call last):
File "/home/user/.local/share/ov/pkg/isaac-sim-4.2.0/kit/kernel/py/omni/ext/_impl/custom_importer.py", line 76, in import_module
return importlib.import_module(name)
File "/home/user/.local/share/ov/pkg/isaac-sim-4.2.0/kit/python/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/home/user/.local/share/ov/pkg/isaac-sim-4.2.0/exts/omni.isaac.universal_robots/omni/isaac/universal_robots/__init__.py", line 9, in <module>
from omni.isaac.universal_robots.kinematics_solver import KinematicsSolver
File "/home/user/.local/share/ov/pkg/isaac-sim-4.2.0/exts/omni.isaac.universal_robots/omni/isaac/universal_robots/kinematics_solver.py", line 12, in <module>
from omni.isaac.core.articulations import Articulation
File "/home/user/.local/share/ov/pkg/isaac-sim-4.2.0/exts/omni.isaac.core/omni/isaac/core/__init__.py", line 11, in <module>
from omni.isaac.core.physics_context.physics_context import PhysicsContext
File "/home/user/.local/share/ov/pkg/isaac-sim-4.2.0/exts/omni.isaac.core/omni/isaac/core/physics_context/__init__.py", line 9, in <module>
from omni.isaac.core.physics_context.physics_context import PhysicsContext
File "/home/user/.local/share/ov/pkg/isaac-sim-4.2.0/exts/omni.isaac.core/omni/isaac/core/physics_context/physics_context.py", line 15, in <module>
from omni.isaac.core.utils.prims import get_prim_at_path, get_prim_path, is_prim_path_valid
File "/home/user/.local/share/ov/pkg/isaac-sim-4.2.0/exts/omni.isaac.core/omni/isaac/core/utils/prims.py", line 24, in <module>
from omni.isaac.core.utils.types import SDF_type_to_Gf
File "/home/user/.local/share/ov/pkg/isaac-sim-4.2.0/exts/omni.isaac.core/omni/isaac/core/utils/types.py", line 12, in <module>
import torch
ModuleNotFoundError: No module named 'torch'
The other errors are also about not being able to find the torch
module. This is puzzling because I’ve already installed torch
in my isaaclab
virtual environment, and everything works perfectly when I run my reinforcement learning code there, no issues at all.
I suspect that Isaac Sim might be using its own bundled Python environment instead of the one from my virtual environment. I checked by running ./python.sh
from the _isaac_sim
folder and tried importing torch
, but it wasn’t installed. The Python version in that environment is:
Python 3.10.14 (main, Apr 12 2024, 18:16:13) [GCC 7.3.1 20180303 (Red Hat 7.3.1-5)] on linux
Here’s some more info about my setup:
- OS: Ubuntu 20.04
- Isaac Sim version: Installed via Omniverse Launcher (
isaac-sim-4.2.0
) - Virtual environment: Miniconda environment named
isaaclab
, Python 3.10.15 - Dependencies:
torch
and all other required libraries are installed inisaaclab
(no issues when running RL code) - NVIDIA driver version: 550.120
I’ve also recorded the terminal output when trying to start Isaac Sim, which might be helpful in diagnosing the problem. You can find that information attached in the file start_info.txt (130.5 KB).
I’m really confused about what’s going wrong here and would appreciate any help. If you need more info, I’m happy to provide it.
Thanks in advance!