IsaacLab: [Bug Report] ModuleNotFoundError:No module named 'omni.isaac.kit‘ ; Had tried the issue #103 Solution

Hi, I am new to this repo I have followed the instruction from https://isaac-sim.github.io/IsaacLab/source/setup/installation/verifying_installation.html to check my installation of IsaacLab. With these two codes

# Option 1: Using the isaaclab.sh executable
# note: this works for both the bundled python and the virtual environment
./isaaclab.sh -p source/standalone/tutorials/00_sim/create_empty.py

# Option 2: Using python in your virtual environment
python source/standalone/tutorials/00_sim/create_empty.py 

And it returns

[INFO] Using python from: /home/paxini/anaconda3/envs/LLM/bin/python                     
Traceback (most recent call last):
  File "/home/xxx/IsaacLab/source/standalone/tutorials/00_sim/create_empty.py", line 20, in <module>
    from omni.isaac.lab.app import AppLauncher
  File "/home/xxx/IsaacLab/source/extensions/omni.isaac.lab/omni/isaac/lab/app/__init__.py", line 15, in <module>
    from .app_launcher import AppLauncher  # noqa: F401, F403
  File "/home/xxx/IsaacLab/source/extensions/omni.isaac.lab/omni/isaac/lab/app/app_launcher.py", line 27, in <module>
    from omni.isaac.kit import SimulationApp
ModuleNotFoundError: No module named 'omni.isaac.kit'

My Isaac Sim is 4.0.0 installed from the Omniverse. I have done a Create Isaac Sim Symbolic Link according to the guide. I am using Ubuntu 20.04

I have read the relative issue posts, i see there were plenty similar error occurred before the name of project change to IsaacLab #269 #406 and #103

I had tried the solution of #103, but it doesn’t work. So I wonder if there are some changes causing the solution from #103 no longer apply-able.
Please if someone counter the same issue and has solution for it, can share?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 28 (3 by maintainers)

Commits related to this issue

Most upvoted comments

The issue is solved, if you running the app/command at conda env, you should run the script “source setup_conda_env.sh”, the file located the Isaacsim root directory.

One simple method to address this if you are using zsh and conda. Write a script isaaclabpy.sh:

#!/usr/bin/env bash

# Exits if error occurs
set -e

# Set tab-spaces
tabs 4

cd _isaac_sim
source setup_conda_env.sh
cd ..
python $1

And set it as executable file:

sudo chmod u+x isaaclabpy.sh

Then use ./isaaclabpy.sh instead of ./isaaclab.sh when you only run Python scripts.

I ran in to the same problem too.

My workflow: Followed the guide https://isaac-sim.github.io/IsaacLab/source/setup/installation/index.html, following the options for Windows and binary installation of IsaacSim

Problem: At the verification stage, I encountered this error: ModuleNotFoundError:No module named 'omni.isaac.kit‘

Solution: Follow this guide: https://docs.omniverse.nvidia.com/isaacsim/latest/installation/install_python.html. The missing Python modules will be installed with the 2 following commands: pip install isaacsim==4.0.0.0 --extra-index-url https://pypi.nvidia.com pip install isaacsim-extscache-physics==4.0.0.0 isaacsim-extscache-kit==4.0.0.0 isaacsim-extscache-kit-sdk==4.0.0.0 --extra-index-url https://pypi.nvidia.com

Perhaps these steps should be added to the IsaacLab guide as well?

Regarding ZSH support, we are looking into it.

I think I found a solution. You need to modify this file: setup_python_env.sh , which is referenced by setup_conda_env_zsh.sh .

setup_python_env.sh : `#!/bin/bash

if [ -n “$ZSH_VERSION” ]; then SCRIPT_DIR=“$( cd “$( dirname “$0” )” && pwd )” else SCRIPT_DIR=“$( cd “$( dirname “${BASH_SOURCE[0]}” )” && pwd )” fi

export PYTHONPATH=$PYTHONPATH:$SCRIPT_DIR/…/…/…/$PYTHONPATH:$SCRIPT_DIR/kit/python/lib/python3.10/site-packages:$SCRIPT_DIR/python_packages:$SCRIPT_DIR/exts/omni.isaac.kit:$SCRIPT_DIR/kit/kernel/py:$SCRIPT_DIR/kit/plugins/bindings-python:$SCRIPT_DIR/exts/omni.isaac.lula/pip_prebundle:$SCRIPT_DIR/exts/omni.exporter.urdf/pip_prebundle:$SCRIPT_DIR/extscache/omni.kit.pip_archive-0.0.0+10a4b5c0.lx64.cp310/pip_prebundle:$SCRIPT_DIR/exts/omni.isaac.core_archive/pip_prebundle:$SCRIPT_DIR/exts/omni.isaac.ml_archive/pip_prebundle:$SCRIPT_DIR/exts/omni.pip.compute/pip_prebundle:$SCRIPT_DIR/exts/omni.pip.cloud/pip_prebundle export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SCRIPT_DIR/…/…/…/$LD_LIBRARY_PATH:$SCRIPT_DIR/.:$SCRIPT_DIR/exts/omni.usd.schema.isaac/plugins/IsaacSensorSchema/lib:$SCRIPT_DIR/exts/omni.usd.schema.isaac/plugins/RangeSensorSchema/lib:$SCRIPT_DIR/exts/omni.isaac.lula/pip_prebundle:$SCRIPT_DIR/exts/omni.exporter.urdf/pip_prebundle:$SCRIPT_DIR/kit:$SCRIPT_DIR/kit/kernel/plugins:$SCRIPT_DIR/kit/libs/iray:$SCRIPT_DIR/kit/plugins:$SCRIPT_DIR/kit/plugins/bindings-python:$SCRIPT_DIR/kit/plugins/carb_gfx:$SCRIPT_DIR/kit/plugins/rtx:$SCRIPT_DIR/kit/plugins/gpu.foundation`

Hi @sunmingang, It does not work for me. What exact command do you run?

The issue is solved, if you running the app/command at conda env, you should run the script “source setup_conda_env.sh”, the file located the Isaacsim root directory. Have you run this correctly? image

Hi @swstbecrpgmail,

Sure, I have done this. And I just ran the source setup_conda_env.sh from the _isaac_sim folder. But it just does not work.

Hi @swstbecrpgmail and @sunmingang,

After I first switched to bash and then run source, it finally worked… I think this should be fixed for the Zsh and Conda users. This is very inconvenient to use and may be confusing.

I am using Ubuntu 20.04. It turns out that you need to source the Isaac setup shell. I copied the solution from here: https://forums.developer.nvidia.com/t/no-module-named-omni-isaac/197312/4.

So, you need ‘cd _issac_sim’ as you already created the link if you follow the install guide, or you go to the directory you install Isaac, then source setup_python_env.sh or as I did source setup_conda_env.sh because I use conda env.

Hi @cidxb, Have you done ./isaaclab.sh -i ?