Executing code in ipython kernel with the KernelClient API
问题 I have an existing ipython kernel, with a communication file 'path/comm_file.json' and I want to execute code in this kernel using the Kernel Client API (actually I'm not picky, any method will do..). I understood that this is the best way to do things from the jupyter documentation. So I write the following code: from jupyter_client import KernelClient client = KernelClient(connection_file='path/comm_file.json') client.execute('a = 10') But the execute method leads to the following error: