Closed mattmazzola closed 4 months ago
Upon further investigation I think the issue is with the use of BASH_SOURCE[0]
I am using Zsh and this variable is not defined when running the script resulting in the wrong path being set for $MY_DIR thus the wrong path to find setup_python_env.sh
I changed ${BASH_SOURCE[0]}"
to $0
and added log statements to verify, and conda activate seems to work now!
(orbit) ➜ orbit git:(main) ✗ conda deactivate
(base) ➜ orbit git:(main) ✗ conda activate orbit
BASH_SOURCE_0:
0: /home/mattm/repos/orbit/_isaac_sim/setup_conda_env.sh
It looks like BASH_SOURCE[0]
is used in different places throughout the repo which may mean this problem would exist in many places.
I think setup_conda_env.sh
comes from installation of Isaac sim so I am not sure where to send PR to fix, but this is what I arrived at so both Bash and Zsh (and hopefully others work)
if [ -n "$BASH_VERSION" ]; then
# Bash
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
else
# Fallback for other shells
SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
fi
The above comment only solved the issue about activating orbit environment. However, it did not fix the issue with modules.
Here is more complete solution: https://github.com/NVIDIA-Omniverse/orbit/issues/103#issuecomment-1662112177
If you are submitting a bug report, please fill in the following details and use the tag [bug].
Describe the bug
Another issue noticed when attempting to resolve installations issue described in #406
When attempting to activate orbit environment, it fails to find
setup_python_env.sh
because it is looking in the current, Orbit repo directory instead of the_isaac_sim
symbolic linked directory where it should.Steps to reproduce
Please try to provide a minimal example to reproduce the bug. Error messages and stack traces are also helpful.
setup_conda_env.sh
Work around?
Running
conda activate orbit
from the ISAACSIM_PATH allows the script to find thesetup_python_env.sh
file; however, I don't think this should be requiredSystem Info
Describe the characteristic of your environment:
Additional context
Add any other context about the problem here.
Checklist