isaac-sim / IsaacLab

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

[Question] No module named 'omni.isaac' when using zshell instead of bash #103

Open zydczqcnydx opened 1 year ago

zydczqcnydx commented 1 year ago

ModuleNotFoundError: No module named 'omni.isaac'

Why is this error reported when there is an omni library in my conda environmen.I followed the official document configuration

Mayankm96 commented 1 year ago

I am unable to reproduce this error. Can you please provide more details on what exactly you're trying to run and what steps you followed for the setup?

zydczqcnydx commented 1 year ago

I found a solution to this problem, but he looks very stupid.I find that when I run this command
"conda activate orbit" It reminded me that " ~/Orbit/_isaac_sim/setup_conda_env.sh:.:20: no such file or directory: ~/Orbit/setup_python_env.sh " So, when I activate my conda env , I run this command "cd ~/Orbit/_isaac_sim && conda activate orbit" This problem wouldn't have arisen. I can run this command correctly " python -c "import omni.isaac "

zydczqcnydx commented 1 year ago

I also found out that the path in 'setup_conda. sh' needs to be modified because the shell I am using is zsh. Thinks.

Mayankm96 commented 1 year ago

Maybe some commands aren't being checked properly for zsh terminal in the orbit.sh script. I will have to take a closer look at this for zsh and find a solution.

If you find a fix in the meantime, would be great to learn about it.

zydczqcnydx commented 1 year ago

I have made the necessary modifications to the zsh adaptation code for setup_conda_env.sh and setup_python_env. sh. You can use zsh to run the existing code as follows:

setup_conda_env. sh
#!/bin/zsh  
SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)  
MY_DIR=$(realpath -s "$SCRIPT_DIR")  

export CARB_APP_PATH=$SCRIPT_DIR/kit  
export EXP_PATH=$MY_DIR/apps  
export ISAAC_PATH=$MY_DIR  
source $ISAAC_PATH/setup_python_env.sh  
setup_python_env. sh
#!/bin/zsh  
SCRIPT_DIR=$(dirname "${(%):-%x}")  
export PYTHONPATH=$PYTHONPATH:$SCRIPT_DIR/../../../$PYTHONPATH:$SCRIPT_DIR/exts/omni.isaac.kit:$SCRIPT_DIR/exts/omni.isaac.gym:$SCRIPT_DIR/kit/kernel/py:$SCRIPT_DIR/kit/plugins/bindings-python:$SCRIPT_DIR/kit/extscore/omni.kit.pip_archive/pip_prebundle:$SCRIPT_DIR/exts/omni.isaac.core_archive/pip_prebundle:$SCRIPT_DIR/exts/omni.isaac.ml_archive/pip_prebundle:$SCRIPT_DIR/extscache/omni.pip.torch-1_13_1-0.1.4+104.2.lx64/torch-1-13-1  
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SCRIPT_DIR/../../../$LD_LIBRARY_PATH:$SCRIPT_DIR/.:$SCRIPT_DIR/exts/omni.usd.schema.isaac/bin:$SCRIPT_DIR/exts/omni.isaac.motion_planning/bin:$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:$SCRIPT_DIR/kit/extensions/extensions-bundled/bin  
amirhnourian commented 7 months ago

Hello I am currently using shell and also encountering this error what should I do?: Documents/GitHub/orbit/source/standalone/tutorials/00_sim/create_empty.py", line 20, in from omni.isaac.orbit.app import AppLauncher ModuleNotFoundError: No module named 'omni.isaac.orbit'

mattmazzola commented 4 months ago

Based on the comments

the necessary modifications to the zsh adaptation code

using shell and also encountering this error

I also ran into this on with more explanation but maybe only a partial solution : #407

Although the comment above may be more complete: https://github.com/NVIDIA-Omniverse/Orbit/issues/103#issuecomment-1662112177