Windows 下的 Jupyter 中 kernel-1234.json 在哪里?

Tim*_*m D 2 python ipython jupyter

IPython 具有用于定位内核连接文件的有用功能。

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'
Run Code Online (Sandbox Code Playgroud)

JupyterWindows 上的等效项是什么?

Tim*_*m D 6

自我回答:

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'
Run Code Online (Sandbox Code Playgroud)