Opening a terminal window from Jupyter Notebook

Viewed 860

I have a Jupyter Notebook that prepares certain files. Then, I open a zsh terminal window and run a Python file (computations.py), which requires the files prepared. I run this computation outside of Jupyter because it takes a long time, uses considerable resources, and prints a very long output in the terminal, which could cause problems if run directly in the notebook.

Is there a way to open an independent window of the zsh terminal by executing a cell in Jupyter Notebook and run some prespecified commands in said terminal? Specifically, I would like to run conda activate my_env; time python computations.py).

Please note that I do not want to run the code computations.py in Jupyter itself (e.g. using %%bash or !python computations.py).

Thank you very much for your help

0 Answers
Related