KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums KX Academy Unable to find a q kernel in the Jupyter sandbox

  • Unable to find a q kernel in the Jupyter sandbox

    Posted by abstrphil on February 3, 2025 at 10:05 am

    Hi,

    I am unable to load a q kernel for the notebooks in the sandbox. It does not seem to be an available kernel at all. This is occurring in the Developer Level 3 course, although when I tried to reopen the sandbox from the link in the course, it opened my sandbox from the Level 2 course, albeit with no q kernel either.

    abstrphil replied 1 week ago 2 Members · 2 Replies
  • 2 Replies
  • coremem

    Member
    February 3, 2025 at 10:18 am

    The upgrade over the weekend removed JupyterQ/embedpy as PyKX can be configured to replace it now.

    If you ‘git pull’ the project, or reopen the sandbox link from the course page, it should resolve its-self. The problem may be that the upstream changes can no longer be merged into your local copy so may need some manual intervention. A quick fix would be to move the existing course project (with your existing work) to the side by renaming it and then refetch the project with the sandbox linky as usual.

    On a related note, for your own notebooks, select ‘Python 3 (ipykernel)’ as your kernel make the first cell contain:

    #;.pykx.disableJupyter()

    The second cell contain:

    # https://code.kx.com/pykx/3.0/examples/jupyter-integration.html#q-first-mode
    import pykx as kx
    kx.util.jupyter_qfirst_enable()
    

    Then it should behave just like the previous JupyterQ/embedpy kernel.

    • abstrphil

      Member
      March 4, 2025 at 9:01 am

      Thanks for the help, it did work. However, I’d just like to point out one minor issue (but perhaps it’s been fixed since): if I have to restart the kernel for whatever reason, I think there are some hidden cells (presumably containing the import and  `qfirst_enable`,  which don’t run unless you explicitly run all cells above a selected cell.

Log in to reply.