I\'m trying to use the bash kernel in iPython/Jupyter notebook, but I need sudo access within the notebook itself.
I\'ve tried $ sudo jupyter notebook
to ru
In case anyone is still looking for an answer, this is what worked for me:
sudo ~/.local/bin/jupyter-notebook --allow-root
Switching user using su didn't work because I didn't have jupyter installed on root. Using just --allow-root by itself also didn't work for me. This allows you to run sudo with jupyter notebook without running into the issue of "notebook" not being a valid command. Because I am using a linux terminal, jupyter-notebook is installed at ~/.local/bin/jupyter-notebook. See After installing with pip, "jupyter: command not found" for more information about where jupyter may be installed.