You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug Report] Conda environment not being setup correctly for ZSH #703
changed the title [-][Bug Report] Conda environment not being setup correctly[/-][+][Bug Report] Conda environment not being setup correctly for ZSH[/+]on Jul 20, 2024
Checking with the latest Isaac Lab v2.0.1 release (with Isaac Sim 4.5.0), the ./isaaclab.sh --conda can run without error. However, another immediate error occurs:
$ git clone [email protected]:isaac-sim/IsaacLab.git
$ cd IsaacLab
$ ln -s path_to_isaac_sim _isaac_sim
$ ./isaaclab.sh --conda
[INFO] Using default conda environment name: env_isaaclab
[INFO] Creating conda environment named 'env_isaaclab'...
...
$ conda activate env_isaaclab
$ ./isaaclab.sh --install
[INFO] Installing extensions inside the Isaac Lab repository...
find: ‘/home/johnson/IsaacLab/_isaac_sim/source’: No such file or directory
This is due to the ${BASH_SOURCE[0]} used in the ./isaaclab.sh script to determine $ISAACLAB_PATH has been incorrectly changed after activating the conda environment:
causing the $ISAACLAB_PATH to incorrectly point to $HOME/IsaacLab/_isaac_sim (instead of the correct $HOME/IsaacLab)
The BASH_SOURCE environment variable is incorrectly modified by Isaac Sim 4.5.0 upstream script ~/isaacsim/setup_conda_env.sh. Removing the export line in setup_conda_env.sh fixes the issue:
#!/bin/bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ -n "$ZSH_VERSION" ]; then
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
- export BASH_SOURCE=$SCRIPT_DIR/setup_python_env.sh
fi
MY_DIR="$(realpath -s "$SCRIPT_DIR")"
On further investigation, the reason of introducing the export line above is a non-ideal fix for ~/isaacsim/setup_python_env.sh to determine its filepath when using ZSH. To fix this issue, Isaac Sim v4.0.0 -> v4.1.0 introduces this export hack.
As Isaac Sim v4.1.0 -> v4.2.0 includes a correct patch that fixed setup_python_env.sh, this hack is no longer needed after v4.2.0. This patch looks something like:
Aside from applying the fix for ~/isaacsim/setup_conda_env.sh:
#!/bin/bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ -n "$ZSH_VERSION" ]; then
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
export BASH_SOURCE=$SCRIPT_DIR/setup_python_env.sh
fi
MY_DIR="$(realpath -s "$SCRIPT_DIR")"
The isaaclab.sh script should also be patched too (according to #707):
fi
I wonder if we should re-open PR #707? (or submit the same PR again?)
Hi, I met the same problem when I tried to install the Isaac lab with isaacsim4.5 using zsh. The error says could not find the source file under _isaac_sim folder. And I tried to follow your instructions to modify the isaaclab.sh and ~/isaacsim/setup_conda_env.sh. The problem occurs again. Could you help with fixing this installing issue?
Hi, I found out that the Isaac lab path env is correctly fixed after re-opening a terminal to install the Isaac lab. But there is a warning to set up the VS Code settings. [WARN] Could not find Isaac Sim VSCode settings: /home/xm-laptop/Code/issac/IsaacLab/_isaac_sim/.vscode/settings.json.
This will result in missing 'python.analysis.extraPaths' in the VSCode
settings, which limits the functionality of the Python language server.
However, it does not affect the functionality of the Isaac Lab project.
We are working on a fix for this issue with the Isaac Sim team.
And I try to look for the .vscode folder in my isaacsim folder, I found that there is no .vscode folder under my isaacsim. My Isaacsim is installed by pre-built binaries.
I resolved this issue by modifying both setup_conda_env.sh and setup_python_env.sh.
The key point is that the original logic uses SCRIPT_DIR based on the runtime working directory rather than the actual script location, which causes incorrect path resolution when sourced from another shell or directory.
Here’s the fix I applied:
if [ -n"$ZSH_VERSION" ];then
SCRIPT_PATH="${(%):-%x}"else
SCRIPT_PATH="${BASH_SOURCE[0]}"fi
SCRIPT_DIR="$(cd"$( dirname "$SCRIPT_PATH")"&&pwd)"
This ensures that SCRIPT_DIR always correctly refers to the directory where the script is located, regardless of the current terminal working directory or whether it's being sourced from bash or zsh.
Reacted by minghaoL1, Grant Tannert, Yan Wang and Sepehr MohaimenianPour
Hi, we have now migrated to a uv workflow and recommend all users to migrate as of IsaacLab 3.0. Please try out uv and let us know if there are any issues.
Activity
[-][Bug Report] Conda environment not being setup correctly[/-][+][Bug Report] Conda environment not being setup correctly for ZSH[/+]j3soon commentedon Feb 28, 2025
Checking with the latest Isaac Lab v2.0.1 release (with Isaac Sim 4.5.0), the
./isaaclab.sh --condacan run without error. However, another immediate error occurs:This is due to the
${BASH_SOURCE[0]}used in the./isaaclab.shscript to determine$ISAACLAB_PATHhas been incorrectly changed after activating the conda environment:causing the
$ISAACLAB_PATHto incorrectly point to$HOME/IsaacLab/_isaac_sim(instead of the correct$HOME/IsaacLab)The
BASH_SOURCEenvironment variable is incorrectly modified by Isaac Sim 4.5.0 upstream script~/isaacsim/setup_conda_env.sh. Removing theexportline insetup_conda_env.shfixes the issue:On further investigation, the reason of introducing the
exportline above is a non-ideal fix for~/isaacsim/setup_python_env.shto determine its filepath when using ZSH. To fix this issue, Isaac Sim v4.0.0 -> v4.1.0 introduces thisexporthack.As Isaac Sim v4.1.0 -> v4.2.0 includes a correct patch that fixed
setup_python_env.sh, this hack is no longer needed after v4.2.0. This patch looks something like:I'll keep this issue open for now, and will file a upstream issue to request removal of the
exportline in Isaac Sim.Potentially related issues:
add_cubes.py, isaac_sim stuck. And running ./isaaclab.sh --install, an error message "No such file or directory" appears. #1490j3soon commentedon Feb 28, 2025
Aside from applying the fix for
~/isaacsim/setup_conda_env.sh:The
isaaclab.shscript should also be patched too (according to #707):printf '%s\n' \ '# for Isaac Sim' \ - 'source '${isaacsim_setup_conda_env_script}'' \ + 'cd '${ISAACLAB_PATH}'/_isaac_sim' \ + 'source setup_conda_env.sh' \ + 'cd $OLDPWD' \ '' >> ${CONDA_PREFIX}/etc/conda/activate.d/setenv.sh fiI wonder if we should re-open PR #707? (or submit the same PR again?)
Xunmenggod commentedon Apr 22, 2025
Hi, I met the same problem when I tried to install the Isaac lab with isaacsim4.5 using zsh. The error says could not find the source file under _isaac_sim folder. And I tried to follow your instructions to modify the isaaclab.sh and ~/isaacsim/setup_conda_env.sh. The problem occurs again. Could you help with fixing this installing issue?
j3soon commentedon Apr 22, 2025
Hi @Xunmenggod, did you linked the isaacsim folder as mentioned here? https://isaac-sim.github.io/IsaacLab/main/source/setup/installation/binaries_installation.html#creating-the-isaac-sim-symbolic-link
Xunmenggod commentedon Apr 22, 2025
Thanks for your reply. I did the step of soft link for isaac sim folder. But the same problem that could not find the source folder occurs again.
Xunmenggod commentedon Apr 27, 2025
Hi, I found out that the Isaac lab path env is correctly fixed after re-opening a terminal to install the Isaac lab. But there is a warning to set up the VS Code settings. [WARN] Could not find Isaac Sim VSCode settings: /home/xm-laptop/Code/issac/IsaacLab/_isaac_sim/.vscode/settings.json.
This will result in missing 'python.analysis.extraPaths' in the VSCode
settings, which limits the functionality of the Python language server.
However, it does not affect the functionality of the Isaac Lab project.
We are working on a fix for this issue with the Isaac Sim team.
And I try to look for the .vscode folder in my isaacsim folder, I found that there is no .vscode folder under my isaacsim. My Isaacsim is installed by pre-built binaries.
csirois14 commentedon Apr 30, 2025
I have the same problem. It think it's because the scrip's directory is not found correctly with zsh.
I fixed it by replacing line 19 of
isaaclab.shto
And replacing the line
in
_isaac_sim/setup_conda_env.shand_isaac_sim/setup_python_env.shtoYou then need to deactivate and reactivate your conda env. Hope this helps!
Leex1 commentedon May 15, 2025
I resolved this issue by modifying both
setup_conda_env.shandsetup_python_env.sh.The key point is that the original logic uses
SCRIPT_DIRbased on the runtime working directory rather than the actual script location, which causes incorrect path resolution when sourced from another shell or directory.Here’s the fix I applied:
This ensures that
SCRIPT_DIRalways correctly refers to the directory where the script is located, regardless of the current terminal working directory or whether it's being sourced from bash or zsh.Leex1 commentedon May 15, 2025
setup_conda_env.sh(you can copy and replace yours):StafaH commentedon Sep 24, 2026
Hi, we have now migrated to a uv workflow and recommend all users to migrate as of IsaacLab 3.0. Please try out uv and let us know if there are any issues.