2

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

Vincent
  • 105
  • 7
  • You tagged your question JupyterLab. JupyterLab does provide an ability to [open terminals](https://jupyterlab.readthedocs.io/en/stable/user/terminal.html). Is your question about how to switch it to use zsh instead of bash? – krassowski Jan 12 '22 at 12:56
  • Thank you for your reply. The question is how to trigger the execution of specific code in a new terminal window by running a code cell in a Jupyter notebook. If possible, I would like the zsh terminal to pop up as a separate window and execute the desired code. – Vincent Jan 14 '22 at 08:05
  • Sounds like a task for https://github.com/jtpio/ipylab – krassowski Jan 14 '22 at 10:26

0 Answers0