正确使用jupyter CLI参数?

dan*_*gom 5 jupyter jupyter-notebook

免责声明我使用jupyter kernel,但问题也与此有关jupyter notebook

据称jupyter kernel --help-all,我应该能够通过设置一个名为的参数来更改jupyter内核JSON连接文件--KernelManager.connection_file

如果我正确理解这一点,则意味着以下命令:

jupyter kernel --KernelManager.connection_file=connection.json
Run Code Online (Sandbox Code Playgroud)

应该启动一个内核,并给我一个名为connection.json的连接文件。

但是,这就是我得到的:

? jupyter kernel --KernelManager.connection_file='test-this-thing.json'
[KernelApp] Starting kernel 'python3'
[KernelApp] Connection file: /Users/me/Library/Jupyter/runtime/kernel-1e65d0fe-bf8e-1234-8208-463bd4a1234a.json
Run Code Online (Sandbox Code Playgroud)

现在,jupyter不会抱怨我传递了错误的参数,也没有传递任何东西,只是没有更改连接文件。

难道我做错了什么?如何正确更改连接文件名?

小智 1

本质上,您在上面的代码中所做的一切都是错误的。以前,内核会使用硬编码的文件位置覆盖您设置为连接文件的任何内容。

现在已根据以下拉取请求修复了此问题: