I would like to run an IPython instance on one machine and connect to it (over LAN) from a different process (to run some python commands). I understand that it is possible
The above answers are a bit old. The solution for the latest version of ipython
is much simpler but is not documented well at one place. So I thought I would document it here.
Windows
If either the client or server is a linux
or other operating system, just change the location of kernel-1234.json
appropriately based on Where is kernel-1234.json located in Jupyter under Windows?
ipykernel
is installed using pip install ipykernel
ipykernel
using ipython kernel -f kernel-1234.json
kernel-1234.json
file on your Windows
machine. The file will probably have a different number, not 1234
and will most likely be located in 'C:\Users\me\AppData\Roaming\jupyter\runtime\kernel-1234.json': https://stackoverflow.com/a/48332006/4752883pip install jupyter-console
or pip install qtconsole
https://jupyter-console.readthedocs.io/en/latest/ipconfig
to find out the ip address of your Windows server. (On Linux do a ifconfig
at the shell prompt). In the kernel-1234.json
file change the ip address from 127.0.0.1
to the ip address of your server. If you are connecting from another Windows
server, then copy the kernel-1234.json
file to your local computer and note down the path. kernel-1234.json
and start Jupyter Console using jupyter console --existing kernel-1234.json