I am developing a Python extension for Isaac Sim. It relies on some libraries in a folder on my machine, the location of the folder is non standard, and I want to modify PYTHONPATH
to make sure that folder will be found by Python runtime, when the extension is running. However I can’t find a way to do it, I found that there is [[env]]
section in toml
config I tried to set it like so:
[[env]]
name = "PYTHONPATH"
value = "/home/michael/some/folder"
isPath = true
append = true
But it seems it does not work, because when I do later in the code of my extension
import os
print(os.environ.get("PYTHONPATH"))
The value of the environment variable is empty.
Maybe there is a better way to specify search path for an extension in Omniverse?
I guess I can also just append the path directly in code, but that seems a little too dirty