Where does IPython look for info when trying to connect to kernel

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Where does IPython look for info when trying to connect to kernel

klo uo
I start kernel:

========================================
> ipython kernel
NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work.

To exit, you will have to explicitly quit this process, by either sending
"quit" from a client, or using Ctrl-\ in UNIX-like environments.



To connect another client to this kernel, use:
    --existing kernel-10128.json
========================================

Where is "kernel-10128.json" located?

I dont see it in ~/.ipython/profile_default/security nor anywhere in ~/ipython subfolders nor in temp location. 

If I try with `ipython console --existing` I connect successfully, but not from IPython instance that I point to custom path with IPYTHONDIR env (path that kernel instance is using).

If last sentence is confusing, ignore it, I'm just interested where is this file located?


_______________________________________________
IPython-dev mailing list
[hidden email]
https://mail.scipy.org/mailman/listinfo/ipython-dev
Reply | Threaded
Open this post in threaded view
|

Re: Where does IPython look for info when trying to connect to kernel

Thomas Kluyver-2
On 15 July 2016 at 07:22, klo uo <[hidden email]> wrote:
Where is "kernel-10128.json" located?

I dont see it in ~/.ipython/profile_default/security nor anywhere in ~/ipython subfolders nor in temp location. 

Sorry for the confusion. When IPython and Jupyter split, the general idea of kernels and connection files went to Jupyter. IPython provides a specific Jupyter kernel for running Python code.

You can see where connection files live on your platform by running:

jupyter --runtime-dir

_______________________________________________
IPython-dev mailing list
[hidden email]
https://mail.scipy.org/mailman/listinfo/ipython-dev
Reply | Threaded
Open this post in threaded view
|

Re: Where does IPython look for info when trying to connect to kernel

klo uo
Thanks Thomas

So on my Windows default location is "%appdata%\jupyter\runtime"

Do you perhaps know if jupyter accepts custom default location, as it was with IPYTHONDIR for ipython, or should I ask on jupyter list?

On Fri, Jul 15, 2016 at 1:38 PM, Thomas Kluyver <[hidden email]> wrote:
On 15 July 2016 at 07:22, klo uo <[hidden email]> wrote:
Where is "kernel-10128.json" located?

I dont see it in ~/.ipython/profile_default/security nor anywhere in ~/ipython subfolders nor in temp location. 

Sorry for the confusion. When IPython and Jupyter split, the general idea of kernels and connection files went to Jupyter. IPython provides a specific Jupyter kernel for running Python code.

You can see where connection files live on your platform by running:

jupyter --runtime-dir

_______________________________________________
IPython-dev mailing list
[hidden email]
https://mail.scipy.org/mailman/listinfo/ipython-dev



_______________________________________________
IPython-dev mailing list
[hidden email]
https://mail.scipy.org/mailman/listinfo/ipython-dev
Reply | Threaded
Open this post in threaded view
|

Re: Where does IPython look for info when trying to connect to kernel

Thomas Kluyver-2
On 15 July 2016 at 13:07, klo uo <[hidden email]> wrote:
Do you perhaps know if jupyter accepts custom default location, as it was with IPYTHONDIR for ipython, or should I ask on jupyter list?

Yes, there's a JUPYTER_RUNTIME_DIR environment variable. Docs here:
http://jupyter.readthedocs.io/en/latest/projects/jupyter-directories.html#runtime-files

_______________________________________________
IPython-dev mailing list
[hidden email]
https://mail.scipy.org/mailman/listinfo/ipython-dev
Reply | Threaded
Open this post in threaded view
|

Re: Where does IPython look for info when trying to connect to kernel

klo uo
Nice :)

After setting IPYTHONDIR and JUPYTER_RUNTIME_DIR in .bashrc on Windows 10 WSL Bash shell (https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux) to my system IPython/Jupyter, I can now share same settings for both and easily share IPython sessions between the two.



On Fri, Jul 15, 2016 at 2:10 PM, Thomas Kluyver <[hidden email]> wrote:
On 15 July 2016 at 13:07, klo uo <[hidden email]> wrote:
Do you perhaps know if jupyter accepts custom default location, as it was with IPYTHONDIR for ipython, or should I ask on jupyter list?

Yes, there's a JUPYTER_RUNTIME_DIR environment variable. Docs here:
http://jupyter.readthedocs.io/en/latest/projects/jupyter-directories.html#runtime-files

_______________________________________________
IPython-dev mailing list
[hidden email]
https://mail.scipy.org/mailman/listinfo/ipython-dev



_______________________________________________
IPython-dev mailing list
[hidden email]
https://mail.scipy.org/mailman/listinfo/ipython-dev