O Bash Kernel, I think I hate you

I’m trying to get started with Jupyter, using it to document an Ansible project that I’m developing in Visual Studio Code on macOS.

I have over fifty years of experience with software, but I’m new to Ansible, Visual Studio and Jupyter, so the scope for screwing things up is considerable :slight_smile:

I have identified the cells that I think I need: Ansible, Bash/Shell Script, and Markdown. I have added the appropriate kernels (Ansible, Bash) and VScode extensions (Jupyter, Python) and everything seems to work. Except it doesn’t. :frowning:

So, my questions:

  1. Would I be better off trying to use Jupyter notebook directly (from the browser) rather than through VScode?

  2. Why does the Bash Kernel suppress stdout in a Shell Script cell? I can do that in the shell commands themselves if I want to.

  3. With Bash Kernel, why doesn’t the Bash magic %%bash switch stdout back on as opposed to generating an error (bash: fg: %%bash: no such job)?

  4. How do I remove the Bash Kernel entirely from my configuration? I’ve tried completely deleting my venv folder, but Bash Kernel reappears when I recreate the venv.

All I want to do is to describe my Ansible playbooks, roles, etc. and document how to invoke them from the command line.

I tried to use jupyter notebook, but I find VScode easier to use at the moment.

However, I have managed to install ipykernel and bash_kernel by letting VScode create the virtual environment (venv) for Python rather than doing it from the command line. My cells now all execute correctly. And: the Bash magic (%%bash) now displays the Shell Script output.

So no need to remove bash_kernel.