$ jupyter
jupyter.exe jupyter-migrate.exe jupyter-notebook.exe jupyter-troubleshoot.exe
jupyter-console.exe jupyter-nbconvert.exe jupyter-qtconsole.exe jupyter-trust.exe
jupyter-kernelspec.exe jupyter-nbextension.exe jupyter-serverextension.exe
How is the jupyter ecosystem structured?
In [33]:
!jupyter --help
In [9]:
!jupyter --paths
In [10]:
!jupyter --paths --json
Let us pass a subcommand to jupyter. I am gonna take a wild guess here..
In [12]:
!jupyter wtf
Oh well! Quite expected.
So how can i find the sub commands that I can pass to the jupyter command?
YES! pyreverse to the rescue!!
In [14]:
!pyreverse --help
In [18]:
!pyreverse jupyter_core.command -p jupyter_core.command
In [20]:
!ls *.dot
In [ ]:
# %load classes_jupyter_core.command.dot
digraph "classes_jupyter_core.command" {
charset="utf-8"
rankdir=BT
"0" [label="{JupyterParser|epilog\l|}", shape="record"];
}
I can now use GraphViz dot to convert to a png!
In [23]:
!dot -Tpng classes_jupyter_core.command.dot -o classes_jupyter_core.command.png
In [24]:
!ls classes_jupyter_core.command.*
Let us now embed the image.
![](classes_jupyter_core.command.png)
In [25]:
import jupyter_core.command as jupyter_core_command
In [32]:
jupyter_core_command.JupyterParser().epilog
Out[32]:
Ah! Now that we know all the subcommands supported by jupyter, we can start reading their help!
In [34]:
!jupyter console --help
In [37]:
!jupyter kernelspec --help-all
In [38]:
!jupyter kernelspec list
In [40]:
!jupyter script --help-all
In [41]:
!jupyter kernelspec install script
In [2]:
!jupyter notebook --help
$ jupyter kernelspec
No subcommand specified. Must specify one of: ['remove', 'uninstall', 'list', 'install', 'install-self']
Manage Jupyter kernel specifications.
Subcommands
-----------
Subcommands are launched as `jupyter kernelspec cmd [args]`. For information on
using subcommand 'cmd', do: `jupyter kernelspec cmd -h`.
remove
Remove one or more Jupyter kernelspecs by name.
uninstall
Alias for remove
list
List installed kernel specifications.
install
Install a kernel specification directory.
install-self
[DEPRECATED] Install the IPython kernel spec directory for this Python.
$ jupyter notebook list
Currently running servers:
http://localhost:8888/?token=eda3ae4c152f1294b65633eaf8dad301d6769bffa747a028 :: F:\src\GitHub
$ jupyter kernelspec list
Available kernels:
python3 E:\Miniconda3\lib\site-packages\ipykernel\resources
$ python -m ipykernel install --user
Installed kernelspec python3 in C:\Users\satish goda\AppData\Roaming\jupyter\kernels\python3
In [4]:
!cat "C:\Users\satish goda\AppData\Roaming\jupyter\kernels\python3\kernel.json"
$ /c/Python27/python.exe -m ipykernel install --user
Installed kernelspec python2 in C:\Users\satish goda\AppData\Roaming\jupyter\kernels\python2
In [5]:
!cat "C:\Users\satish goda\AppData\Roaming\jupyter\kernels\python2\kernel.json"
In [7]:
!E:\pyvenv\3.6\test1\Scripts\python.exe -m ipykernel install -h
(test1) E:\pyvenv\3.6\test1\Scripts>
python.exe -m ipykernel install --name PyVenv3.6test1 --display-name "Python 3.6 venv test1" --sys-prefix
Installed kernelspec PyVenv3.6test1 in E:\pyvenv\3.6\test1\share\jupyter\kernels\pyvenv3.6test1
In [5]:
!ls E:\pyvenv\3.6\test1\share\jupyter\ -R
(test1) E:\pyvenv\3.6\test1\Scripts> jupyter.exe --paths
config:
C:\Users\satish goda\.jupyter
e:\pyvenv\3.6\test1\etc\jupyter
C:\ProgramData\jupyter
data:
C:\Users\satish goda\AppData\Roaming\jupyter
e:\pyvenv\3.6\test1\share\jupyter
C:\ProgramData\jupyter
runtime:
C:\Users\satish goda\AppData\Roaming\jupyter\runtime