isaac-sim / IsaacLab

Unified framework for robot learning built on NVIDIA Isaac Sim
https://isaac-sim.github.io/IsaacLab
Other
2.13k stars 864 forks source link

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

Closed cidxb closed 4 months ago

cidxb commented 4 months ago

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?

Dhoeller19 commented 4 months ago

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

cidxb commented 4 months ago

./isaaclab.sh -i

Yes, of course I have. I have followed the instruction strictly.

adamphung-ho commented 4 months ago

I got the same issue when verifying isaac lab installation. I switched my shell to zsh and followed solution in #103, but it didn't work. (I installed isaac sim binaries)

fuyh20 commented 4 months ago

./isaaclab.sh -i

Yes, of course I have. I have followed the instruction strictly.

hello,maybe you can use bash and then execute ./isaaclab.sh -i

cidxb commented 4 months ago

./isaaclab.sh -i

Yes, of course I have. I have followed the instruction strictly.

hello,maybe you can use bash and then execute ./isaaclab.sh -i

Hi, I have tried your solution, still not working.

cidxb commented 4 months ago

I personally lean on this is kind of path problem that python can't recognize the module? Since my Issac Sim is running well... It is and I can import the sub modules of omni.isaac . I just don't really know how to fix it ...

adamphung-ho commented 4 months ago

@cidxb you can try to run verifying code with bash shell in vscode. I tried and it worked.

cidxb commented 4 months ago

@cidxb you can try to run verifying code with bash shell in vscode. I tried and it worked.

Thank for the suggestion. I tried, i am using Ubuntu20.04, the terminal is in bash, right?

adamphung-ho commented 4 months ago

Yeah, you can choose different type of shell with vscode, but the default is bash.

sunmingang commented 4 months ago

I have the same issue, Does anyone have a solution ? env: ubuntu22.04, isaacsim 4.0, installed by binary.

sunmingang commented 4 months ago

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.

swstbecrpgmail commented 4 months ago

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.

This works for me, thank you very much!

RunpeiDong commented 4 months ago

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.

swstbecrpgmail commented 4 months ago

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

RunpeiDong commented 4 months ago

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.

RunpeiDong commented 4 months ago

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.

RunpeiDong commented 4 months ago

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.

Mayankm96 commented 4 months ago

Regarding ZSH support, we are looking into it.

RunpeiDong commented 4 months ago

Regarding ZSH support, we are looking into it.

Great! Looking forward to it.

Logan1904 commented 3 months ago

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?

RunpeiDong commented 3 months ago

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?

The solution using pip to install has been added to the guideline as an alternative method to set up. However, this method does not typically work as it has some strict requirements such as system version. In my case, I cannot install isaacsim with pip. This pip installation seems still under development, and I suppose most people would download isaacsim using launcher instead.

Logan1904 commented 3 months ago

Yep, I agree. What I am saying is that when downloading isaacsim using the omniverse launcher, it doesnt provide the required Python modules. The only way to get the omni.isaac.kit modules is to follow this guide for Python setup: https://docs.omniverse.nvidia.com/isaacsim/latest/installation/install_python.html. I think it should be made clearer in the IsaacLab guide

nikolasdoan commented 1 month ago

can you tell which specific version of omni.isaac.kit did you managed to download from this command? "pip install isaacsim-omni.isaac.kit==4.0.0.0 --extra-index-url https://pypi.nvidia.com"?

krishnapraveen7 commented 1 month ago

Fkn re tarded guide with useless setup steps. Why add step with binaries when it doesn't work? If I have to install with pip install isaacsim then only write that , god how is it so fkn hard. So i have spent 2 hours to install useless isaac sim from their bullshit omniverse launcher just to know that i have to do pip install.

krishnapraveen7 commented 1 month ago

Fkn re tarded guide with useless setup steps. Why add step with binaries when it doesn't work? If I have to install with pip install isaacsim then only write that , god how is it so fkn hard. So i have spent 2 hours to install useless isaac sim from their bullshit omniverse launcher just to know that i have to do pip install.

Yes i get this bullshit error. I followed all the steps that are mentioned in the useless guide.

Traceback (most recent call last): File "C:\Users\krishna\ProjectX\IsaacLab\source\standalone\tutorials\00_sim\create_empty.py", line 20, in from omni.isaac.lab.app import AppLauncher File "C:\Users\krishna\ProjectX\IsaacLab\source\extensions\omni.isaac.lab\omni\isaac\lab\app__init__.py", line 15, in from .app_launcher import AppLauncher # noqa: F401, F403 File "C:\Users\krishna\ProjectX\IsaacLab\source\extensions\omni.isaac.lab\omni\isaac\lab\app\app_launcher.py", line 26, in from omni.isaac.kit import SimulationApp ModuleNotFoundError: No module named 'omni.isaac.kit'

zlw21gxy commented 3 weeks ago

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.