I think this could be related to your python environment and the error below that you are getting with Isaac SDK on another post.
ImportError: cannot import name ‘PybindMessage’
Was there any warnings or errors when running ./setup_python_env.sh?
Do you have any problems running the Leonardo Preview sample of any other samples on Isaac Sim?
I would recommend looking at omnikit.py in the helpers folder under the omni_dl_examples folder. If you instantiate an OmniKitHelper object and then import omni it should work.
OS: Ubuntu 22.04
Isaac Sim Ver. 2022.2.1(installed by Omniverse Launcher)
Shell: Bash
run ./python.sh after source setup_python_env.sh, then run import omni in python is OK, but import omni.usd will lead to AttributeError: module 'omni' has no attribute 'usd' problem
Hi @Te77iiiii_Ho - The error message “AttributeError: module ‘omni’ has no attribute ‘usd’” indicates that the ‘omni.usd’ module is not found in your current Python environment. This could be due to several reasons:
The ‘omni.usd’ module is not installed in your Python environment. You can check this by running pip list in your Python environment to see if ‘omni.usd’ is listed.
The ‘omni.usd’ module is not in your Python path. Python uses the PYTHONPATH environment variable to determine where to look for modules to import. You can check your Python path by running echo $PYTHONPATH in your terminal. If the path to the ‘omni.usd’ module is not listed, you can add it by running export PYTHONPATH=$PYTHONPATH:/path/to/omni.usd.
There might be a conflict with another module named ‘omni’ in your Python environment. You can check this by running pip list | grep omni in your Python environment to see if there are any other modules named ‘omni’.