Activate conda environment and run the conda program within Julia script

Hi, developers

I would like to invoke a conda environment within the Julia script and then run the program in the conda environment in Julia using run(pipeline()) to invoke them. It seems that it does not work.

Does anyone know how to achieve this aim in Julia?

1 Like

One solution I found is to use conda run :

run(`conda run -n my_env some_command`)

You have to activate the environment each time, so it’s not great if you have to run something several times, but it seems to work fine otherwise.

Thanks for the question and for the answer, it was exactly what I needed!