ImportError: cannot import name 'skip_code' from 'torch._C._dynamo.eval_frame' (unknown location)

Mahesh_Reddy_Tapeti: <p>I tried to run a model on issac sim using ISSAC_PYTHON, but I get this error. All the versions are correct I have cuda 12.8 and its compatible torch. I even tried running on cpu with no cuda. But still get the same error.</p>
<pre><code class="lang-auto">2025-09-26 10:38:48 [20,751ms] [Error] [omni.kit.app._impl] [py stderr]: Traceback (most recent call last):
2025-09-26 10:38:48 [20,751ms] [Error] [omni.kit.app._impl] [py stderr]:   File "/home/system/PegasusSimulator/examples/1_px4_single_vehicle.py", line 131, in &lt;module&gt;
2025-09-26 10:38:48 [20,751ms] [Error] [omni.kit.app._impl] [py stderr]:     main()
2025-09-26 10:38:48 [20,751ms] [Error] [omni.kit.app._impl] [py stderr]:   File "/home/system/PegasusSimulator/examples/1_px4_single_vehicle.py", line 125, in main
2025-09-26 10:38:48 [20,751ms] [Error] [omni.kit.app._impl] [py stderr]:     pg_app = PegasusApp()
2025-09-26 10:38:48 [20,751ms] [Error] [omni.kit.app._impl] [py stderr]:   File "/home/system/PegasusSimulator/examples/1_px4_single_vehicle.py", line 82, in __init__
2025-09-26 10:38:48 [20,751ms] [Error] [omni.kit.app._impl] [py stderr]:     self.model = SAC() #! this is the rl model
2025-09-26 10:38:48 [20,751ms] [Error] [omni.kit.app._impl] [py stderr]:   File "/home/system/PegasusSimulator/examples/sac.py", line 276, in __init__
2025-09-26 10:38:48 [20,751ms] [Error] [omni.kit.app._impl] [py stderr]:     self.actor_optimizer = torch.optim.Adam(self.actor.parameters(), lr=self.arglist.lr)
2025-09-26 10:38:48 [20,751ms] [Error] [omni.kit.app._impl] [py stderr]:   File "/isaac-sim/kit/python/lib/python3.10/site-packages/torch/optim/adam.py", line 101, in __init__
2025-09-26 10:38:48 [20,751ms] [Error] [omni.kit.app._impl] [py stderr]:     super().__init__(params, defaults)
2025-09-26 10:38:48 [20,751ms] [Error] [omni.kit.app._impl] [py stderr]:   File "/isaac-sim/kit/python/lib/python3.10/site-packages/torch/optim/optimizer.py", line 400, in __init__
2025-09-26 10:38:48 [20,751ms] [Error] [omni.kit.app._impl] [py stderr]:     self.add_param_group(cast(dict, param_group))
2025-09-26 10:38:48 [20,751ms] [Error] [omni.kit.app._impl] [py stderr]:   File "/isaac-sim/kit/python/lib/python3.10/site-packages/torch/_compile.py", line 46, in inner
2025-09-26 10:38:48 [20,752ms] [Error] [omni.kit.app._impl] [py stderr]:     import torch._dynamo
2025-09-26 10:38:48 [20,752ms] [Error] [omni.kit.app._impl] [py stderr]:   File "/isaac-sim/exts/omni.isaac.ml_archive/pip_prebundle/torch/_dynamo/__init__.py", line 3, in &lt;module&gt;
2025-09-26 10:38:48 [20,752ms] [Error] [omni.kit.app._impl] [py stderr]:     from . import convert_frame, eval_frame, resume_execution
2025-09-26 10:38:48 [20,752ms] [Error] [omni.kit.app._impl] [py stderr]:   File "/isaac-sim/exts/omni.isaac.ml_archive/pip_prebundle/torch/_dynamo/convert_frame.py", line 53, in &lt;module&gt;
2025-09-26 10:38:48 [20,752ms] [Error] [omni.kit.app._impl] [py stderr]:     from . import config, exc, trace_rules
2025-09-26 10:38:48 [20,752ms] [Error] [omni.kit.app._impl] [py stderr]:   File "/isaac-sim/exts/omni.isaac.ml_archive/pip_prebundle/torch/_dynamo/trace_rules.py", line 46, in &lt;module&gt;
2025-09-26 10:38:48 [20,752ms] [Error] [omni.kit.app._impl] [py stderr]:     from .variables import (
2025-09-26 10:38:48 [20,752ms] [Error] [omni.kit.app._impl] [py stderr]:   File "/isaac-sim/exts/omni.isaac.ml_archive/pip_prebundle/torch/_dynamo/variables/__init__.py", line 2, in &lt;module&gt;
2025-09-26 10:38:48 [20,752ms] [Error] [omni.kit.app._impl] [py stderr]:     from .builtin import BuiltinVariable
2025-09-26 10:38:48 [20,752ms] [Error] [omni.kit.app._impl] [py stderr]:   File "/isaac-sim/exts/omni.isaac.ml_archive/pip_prebundle/torch/_dynamo/variables/builtin.py", line 27, in &lt;module&gt;
2025-09-26 10:38:48 [20,752ms] [Error] [omni.kit.app._impl] [py stderr]:     from ..guards import GuardBuilder, install_guard
2025-09-26 10:38:48 [20,752ms] [Error] [omni.kit.app._impl] [py stderr]:   File "/isaac-sim/exts/omni.isaac.ml_archive/pip_prebundle/torch/_dynamo/guards.py", line 78, in &lt;module&gt;
2025-09-26 10:38:48 [20,752ms] [Error] [omni.kit.app._impl] [py stderr]:     from .eval_frame import set_guard_error_hook
2025-09-26 10:38:48 [20,752ms] [Error] [omni.kit.app._impl] [py stderr]:   File "/isaac-sim/exts/omni.isaac.ml_archive/pip_prebundle/torch/_dynamo/eval_frame.py", line 49, in &lt;module&gt;
2025-09-26 10:38:48 [20,753ms] [Error] [omni.kit.app._impl] [py stderr]:     from torch._C._dynamo.eval_frame import (  # noqa: F401
2025-09-26 10:38:48 [20,753ms] [Error] [omni.kit.app._impl] [py stderr]: ImportError: cannot import name 'skip_code' from 'torch._C._dynamo.eval_frame' (unknown location)
Fatal Python error: Segmentation fault
</code></pre>
<pre><code class="lang-auto">system@system:~/PegasusSimulator/examples$ ISAACSIM_PYTHON 
Python 3.10.15 (tags/v3.10.15-dirty:ffee63f, Oct  8 2024, 18:53:10) [GCC 7.3.1 20180303 (Red Hat 7.3.1-5)] on linux
Type "help", "copyright", "credits" or "license" for more information.
&gt;&gt;&gt; import torch
&gt;&gt;&gt; import torchvision
&gt;&gt;&gt; print(torch.cuda.is_available())
True

</code></pre>