Where is kernel-1234.json located in Jupyter under

2019-03-05 02:41发布

问题:

IPython has a useful function for locating the kernel connection file.

In [1]: from IPython.lib.kernel import find_connection_file
In [2]: find_connection_file()
Out[2]: 'C:\\Users\\me\\.ipython\\profile_default\\security\\kernel-1234.json'

What is the equivalent in Jupyter on Windows?

回答1:

Self answer:

In [1]: from jupyter_client import find_connection_file
In [2]: find_connection_file()
Out[2]: 'C:\\Users\\me\\AppData\\Roaming\\jupyter\\runtime\\kernel-1234.json'