Unable to Import 'Semantics' from 'pxr' in Isaac Sim Installation

I am currently facing an issue while installing and running Isaac Sim. The following error occurs when I try to run my program:

(isaac-sim) TeleVision_Vuer$ python teleop/teleop_isaacsim.py
Traceback (most recent call last):
  File "/home/leehe/Work/TeleVision/TeleVision_Vuer/teleop/teleop_isaacsim.py", line 3, in <module>
    from omni.isaac.core import World
  File "/home/leehe/.local/share/ov/pkg/isaac-sim-2023.1.1/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/leehe/.local/share/ov/pkg/isaac-sim-2023.1.1/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/leehe/.local/share/ov/pkg/isaac-sim-2023.1.1/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/leehe/.local/share/ov/pkg/isaac-sim-2023.1.1/exts/omni.isaac.core/omni/isaac/core/utils/prims.py", line 19, in <module>
    from omni.isaac.core.utils.semantics import add_update_semantics
  File "/home/leehe/.local/share/ov/pkg/isaac-sim-2023.1.1/exts/omni.isaac.core/omni/isaac/core/utils/semantics.py", line 12, in <module>
    from pxr import Semantics, Usd
ImportError: cannot import name 'Semantics' from 'pxr' (/home/leehe/.conda/envs/isaac-sim/lib/python3.10/site-packages/pxr/__init__.py)

I have also checked the pxr directory in my Python environment, and it appears that the Semantics module is missing:

(isaac-sim) site-packages$ cd pxr
(isaac-sim) pxr$ ls
Ar           Pcp          Sdr      UsdHydra    UsdRender  UsdUtils
Gf           Plug         Tf       UsdLux      UsdRi      UsdVol
__init__.py  pluginfo     Trace    UsdMedia    UsdShade   Vt
Kind         __pycache__  Usd      UsdPhysics  UsdSkel    Work
Ndr          Sdf          UsdGeom  UsdProc     UsdUI

I installed the pxr module using pip, and I have tried different versions of usd-core (23.11, 23.2, and 23.8), but the issue persists.
Has anyone encountered this problem before? Any guidance on how to resolve this would be greatly appreciated.

I am experiencing the same issue. Is there any update on how to get this fixed?

I am using the kit docker container and ran into a similar issue.

I got around this by changing how i invoked kit. from directly launching my app to envoking the dev dependencies: exec “/opt/nvidia/omniverse/kit-kernel/kit” “/opt/nvidia/omniverse/kit-kernel/apps/omni.app.dev.kit” --your --flags --here “@”

this seems to have solved the issue as something brings in the pxr dependency which i need to outline in my extension.

on top of that i got this warning message:
2024-12-04 18:51:36 [2,105ms] [Warning] [pxr.Semantics] pxr.Semantics is deprecated - please use Semantics instead

so it looks like i need to update my code where it is referenced.

I hope this helps :)

to achieve the same thing in your extension you may be able to add the following to the toml:

[dependencies]
“omni.app.dev” = {}

alternatively, if you want to bring in less dependencies you can more concisely import it with

[dependencies]
“omni.kit.environment.core” = {}