From c2eefcd47b455a0ae3b6f384cad962b0fc7cdfca Mon Sep 17 00:00:00 2001 From: Stephan Pleines Date: Fri, 3 Jan 2025 09:00:37 -0800 Subject: [PATCH] add comment, fix bug --- isaaclab.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/isaaclab.sh b/isaaclab.sh index 72f8ee7292..d995fabd4f 100755 --- a/isaaclab.sh +++ b/isaaclab.sh @@ -64,10 +64,11 @@ extract_python_exe() { local python_exe=${ISAACLAB_PATH}/_isaac_sim/python.sh if [ ! -f "${python_exe}" ]; then - # note: we need to check system python for cases such as docker - # inside docker, if user installed into system python, we need to use that - # otherwise, use the python from the kit - if [ $(python -m pip list | grep -c 'isaacsim-rl') ]; then + # Next, see if the system provides python. This includes use cases such as docker in docker, or systems + # where the default python is not the desired python. In the latter case, python would give us the default + # binary even if we are in a virtual environment created with the desired python version. + # That version is ok to use if the isaacsim-rl package is installed. + if (( $(python${PYTHON_VERSION} -m pip list | grep -c 'isaacsim-rl') )); then local python_exe=$(which python${PYTHON_VERSION}) fi fi