Hey, I would like my experiment to call at some point a CLI program installed as a dependency of the experiment. Here is what I do:
myTask = Task.init(...) import subprocess, shlex subprocess.check_output(shlex.split("my-program arg1 arg2")) # I also tried with shell=True
But this fails with FileNotFoundError: [Errno 2] No such file or directory: 'my-program': 'my-program'
my-program
is just the entry point to the CLI of another python package I need to use. I tried using shutil.which("my-program")
and this returns None: at runtime, in the trains-agent temporary venv I cannot launch the program. I could solve this problem by directly calling the path to this executable (my-program), but I don't know where it is installed. Is there any way to retrieve this path?