I can install all dependencies of my python functions in a conda environment and then run the commands in Python script in the terminal, but when the bash commands are executed via os.system(...) inside a Jupyter notebook they are not found, or the wrong version is used. Is there a way to run all bash commands with os.system() and using the e.g. ! ls -artl in the currently active conda environment.
I have multiple conda environments and installed the kernels via ipykernel install --user ....
Now, I can select the different Python kernels for different notebooks.
I tried adding conda activate my_env ; ... to my bash commands and sys.syspath.append(path_to_env_bin_folder).
Both did not work.
Using JupyterLab 3.0.14
UPDATE: This seems to be a JupyterLab issue. I can run the same code with VSCode and it finds all the necessary dependencies. I hope this gets fixed in future versions of JupyterLab.