Let us assume, I want to open a notebook (i.e. with my local Jupyter instance) but I do not want to start the associated kernel (i.e. Python) with it. How can I do this?
Possible use cases:
To my understanding, all LaTeX rendering, JavaScript and CSS should work independent of the kernel. It should then just show me, that the kernel is not connected. I may then decide to start the kernel via the menu.
I did not find this documented anywhere.
I do not want to use nbviewer, since I want it to be integrated as much as possible in my normal Jupyter workflow.
To launch Jupyter Notebook App: Click on spotlight, type terminal to open a terminal window. Enter the startup folder by typing cd /some_folder_name . Type jupyter notebook to launch the Jupyter Notebook App The notebook interface will appear in a new browser window or tab.
Windows File Explorer + Command Prompt Once you've entered your specific folder with Windows Explorer, you can simply press ALT + D, type in cmd and press Enter. You can then type jupyter notebook to launch Jupyter Notebook within that specific folder.
Step 1: Run Jupyter Notebook from remote machine In most cases, this is simply done via an ssh command. Once the console shows, type the following: remoteuser@remotehost: jupyter notebook --no-browser --port=XXXX # Note: Change XXXX to the port of your choice. Usually, the default is 8888.
I don't use Jupyter, only the last version of IPython before the big split, but when I try to open a notebook with a bogus kernel associated with it, IPython offers me to open it "without Kernel". So, the functionality exists, but it's not directly accessible AFAIK.
So I guess you just have to edit the .ipynb
file manually (or write a script to do this) and change the global metadata
field to something like this to achieve your goal:
"metadata": {
"kernelspec": {
"display_name": "bogus",
"language": "bogus",
"name": "bogus"
},
"language_info": {
"codemirror_mode": "<don't change this>",
"mimetype": "text/plain",
"name": "bogus"
}
}
It's only a partial workaround, but it seems to work in all cases. You still need to have the right codemirror configuration in your system.
An alternative would be to write a small kernel that does nothing (like the "Echo Kernel"), but that would be less effective, as you would still need a way of specify different modes of syntax highlighting (except if you only intend to write IPython notebooks).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With